mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-90cf79a997b582bf/out/
development.rs

1#![doc = "MAVLink development dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 0u8;
23pub const DIALECT_NUMBER: u8 = 0u8;
24#[cfg_attr(feature = "ts", derive(TS))]
25#[cfg_attr(feature = "ts", ts(export))]
26#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
27#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28#[cfg_attr(feature = "serde", serde(tag = "type"))]
29#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30#[repr(u32)]
31#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
32pub enum ActuatorConfiguration {
33    #[doc = "Do nothing."]
34    ACTUATOR_CONFIGURATION_NONE = 0,
35    #[doc = "Command the actuator to beep now."]
36    ACTUATOR_CONFIGURATION_BEEP = 1,
37    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
38    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
39    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
41    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
42    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
45}
46impl ActuatorConfiguration {
47    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
48}
49impl Default for ActuatorConfiguration {
50    fn default() -> Self {
51        Self::DEFAULT
52    }
53}
54#[cfg_attr(feature = "ts", derive(TS))]
55#[cfg_attr(feature = "ts", ts(export))]
56#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
57#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
58#[cfg_attr(feature = "serde", serde(tag = "type"))]
59#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
60#[repr(u32)]
61#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
62pub enum ActuatorOutputFunction {
63    #[doc = "No function (disabled)."]
64    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
65    #[doc = "Motor 1"]
66    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
67    #[doc = "Motor 2"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
69    #[doc = "Motor 3"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
71    #[doc = "Motor 4"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
73    #[doc = "Motor 5"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
75    #[doc = "Motor 6"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
77    #[doc = "Motor 7"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
79    #[doc = "Motor 8"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
81    #[doc = "Motor 9"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
83    #[doc = "Motor 10"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
85    #[doc = "Motor 11"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
87    #[doc = "Motor 12"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
89    #[doc = "Motor 13"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
91    #[doc = "Motor 14"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
93    #[doc = "Motor 15"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
95    #[doc = "Motor 16"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
97    #[doc = "Servo 1"]
98    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
99    #[doc = "Servo 2"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
101    #[doc = "Servo 3"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
103    #[doc = "Servo 4"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
105    #[doc = "Servo 5"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
107    #[doc = "Servo 6"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
109    #[doc = "Servo 7"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
111    #[doc = "Servo 8"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
113    #[doc = "Servo 9"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
115    #[doc = "Servo 10"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
117    #[doc = "Servo 11"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
119    #[doc = "Servo 12"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
121    #[doc = "Servo 13"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
123    #[doc = "Servo 14"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
125    #[doc = "Servo 15"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
127    #[doc = "Servo 16"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
129}
130impl ActuatorOutputFunction {
131    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
132}
133impl Default for ActuatorOutputFunction {
134    fn default() -> Self {
135        Self::DEFAULT
136    }
137}
138#[cfg_attr(feature = "ts", derive(TS))]
139#[cfg_attr(feature = "ts", ts(export))]
140#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
142#[cfg_attr(feature = "serde", serde(tag = "type"))]
143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
144#[repr(u32)]
145#[doc = "Enumeration of the ADSB altimeter types"]
146pub enum AdsbAltitudeType {
147    #[doc = "Altitude reported from a Baro source using QNH reference"]
148    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
149    #[doc = "Altitude reported from a GNSS source"]
150    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
151}
152impl AdsbAltitudeType {
153    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
154}
155impl Default for AdsbAltitudeType {
156    fn default() -> Self {
157        Self::DEFAULT
158    }
159}
160#[cfg_attr(feature = "ts", derive(TS))]
161#[cfg_attr(feature = "ts", ts(export))]
162#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
164#[cfg_attr(feature = "serde", serde(tag = "type"))]
165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
166#[repr(u32)]
167#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
168pub enum AdsbEmitterType {
169    ADSB_EMITTER_TYPE_NO_INFO = 0,
170    ADSB_EMITTER_TYPE_LIGHT = 1,
171    ADSB_EMITTER_TYPE_SMALL = 2,
172    ADSB_EMITTER_TYPE_LARGE = 3,
173    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
174    ADSB_EMITTER_TYPE_HEAVY = 5,
175    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
176    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
177    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
178    ADSB_EMITTER_TYPE_GLIDER = 9,
179    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
180    ADSB_EMITTER_TYPE_PARACHUTE = 11,
181    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
182    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
183    ADSB_EMITTER_TYPE_UAV = 14,
184    ADSB_EMITTER_TYPE_SPACE = 15,
185    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
186    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
187    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
188    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
189}
190impl AdsbEmitterType {
191    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
192}
193impl Default for AdsbEmitterType {
194    fn default() -> Self {
195        Self::DEFAULT
196    }
197}
198bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
199impl AdsbFlags {
200    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
201}
202impl Default for AdsbFlags {
203    fn default() -> Self {
204        Self::DEFAULT
205    }
206}
207bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Airspeed sensor flags"] pub struct AirspeedSensorFlags : u8 { # [doc = "Airspeed sensor is unhealthy"] const AIRSPEED_SENSOR_UNHEALTHY = 1 ; # [doc = "True if the data from this sensor is being actively used by the flight controller for guidance, navigation or control."] const AIRSPEED_SENSOR_USING = 2 ; } }
208impl AirspeedSensorFlags {
209    pub const DEFAULT: Self = Self::AIRSPEED_SENSOR_UNHEALTHY;
210}
211impl Default for AirspeedSensorFlags {
212    fn default() -> Self {
213        Self::DEFAULT
214    }
215}
216bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
217impl AisFlags {
218    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
219}
220impl Default for AisFlags {
221    fn default() -> Self {
222        Self::DEFAULT
223    }
224}
225#[cfg_attr(feature = "ts", derive(TS))]
226#[cfg_attr(feature = "ts", ts(export))]
227#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
229#[cfg_attr(feature = "serde", serde(tag = "type"))]
230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
231#[repr(u32)]
232#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
233pub enum AisNavStatus {
234    #[doc = "Under way using engine."]
235    UNDER_WAY = 0,
236    AIS_NAV_ANCHORED = 1,
237    AIS_NAV_UN_COMMANDED = 2,
238    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
239    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
240    AIS_NAV_MOORED = 5,
241    AIS_NAV_AGROUND = 6,
242    AIS_NAV_FISHING = 7,
243    AIS_NAV_SAILING = 8,
244    AIS_NAV_RESERVED_HSC = 9,
245    AIS_NAV_RESERVED_WIG = 10,
246    AIS_NAV_RESERVED_1 = 11,
247    AIS_NAV_RESERVED_2 = 12,
248    AIS_NAV_RESERVED_3 = 13,
249    #[doc = "Search And Rescue Transponder."]
250    AIS_NAV_AIS_SART = 14,
251    #[doc = "Not available (default)."]
252    AIS_NAV_UNKNOWN = 15,
253}
254impl AisNavStatus {
255    pub const DEFAULT: Self = Self::UNDER_WAY;
256}
257impl Default for AisNavStatus {
258    fn default() -> Self {
259        Self::DEFAULT
260    }
261}
262#[cfg_attr(feature = "ts", derive(TS))]
263#[cfg_attr(feature = "ts", ts(export))]
264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
266#[cfg_attr(feature = "serde", serde(tag = "type"))]
267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
268#[repr(u32)]
269#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
270pub enum AisType {
271    #[doc = "Not available (default)."]
272    AIS_TYPE_UNKNOWN = 0,
273    AIS_TYPE_RESERVED_1 = 1,
274    AIS_TYPE_RESERVED_2 = 2,
275    AIS_TYPE_RESERVED_3 = 3,
276    AIS_TYPE_RESERVED_4 = 4,
277    AIS_TYPE_RESERVED_5 = 5,
278    AIS_TYPE_RESERVED_6 = 6,
279    AIS_TYPE_RESERVED_7 = 7,
280    AIS_TYPE_RESERVED_8 = 8,
281    AIS_TYPE_RESERVED_9 = 9,
282    AIS_TYPE_RESERVED_10 = 10,
283    AIS_TYPE_RESERVED_11 = 11,
284    AIS_TYPE_RESERVED_12 = 12,
285    AIS_TYPE_RESERVED_13 = 13,
286    AIS_TYPE_RESERVED_14 = 14,
287    AIS_TYPE_RESERVED_15 = 15,
288    AIS_TYPE_RESERVED_16 = 16,
289    AIS_TYPE_RESERVED_17 = 17,
290    AIS_TYPE_RESERVED_18 = 18,
291    AIS_TYPE_RESERVED_19 = 19,
292    #[doc = "Wing In Ground effect."]
293    AIS_TYPE_WIG = 20,
294    AIS_TYPE_WIG_HAZARDOUS_A = 21,
295    AIS_TYPE_WIG_HAZARDOUS_B = 22,
296    AIS_TYPE_WIG_HAZARDOUS_C = 23,
297    AIS_TYPE_WIG_HAZARDOUS_D = 24,
298    AIS_TYPE_WIG_RESERVED_1 = 25,
299    AIS_TYPE_WIG_RESERVED_2 = 26,
300    AIS_TYPE_WIG_RESERVED_3 = 27,
301    AIS_TYPE_WIG_RESERVED_4 = 28,
302    AIS_TYPE_WIG_RESERVED_5 = 29,
303    AIS_TYPE_FISHING = 30,
304    AIS_TYPE_TOWING = 31,
305    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
306    AIS_TYPE_TOWING_LARGE = 32,
307    #[doc = "Dredging or other underwater ops."]
308    AIS_TYPE_DREDGING = 33,
309    AIS_TYPE_DIVING = 34,
310    AIS_TYPE_MILITARY = 35,
311    AIS_TYPE_SAILING = 36,
312    AIS_TYPE_PLEASURE = 37,
313    AIS_TYPE_RESERVED_20 = 38,
314    AIS_TYPE_RESERVED_21 = 39,
315    #[doc = "High Speed Craft."]
316    AIS_TYPE_HSC = 40,
317    AIS_TYPE_HSC_HAZARDOUS_A = 41,
318    AIS_TYPE_HSC_HAZARDOUS_B = 42,
319    AIS_TYPE_HSC_HAZARDOUS_C = 43,
320    AIS_TYPE_HSC_HAZARDOUS_D = 44,
321    AIS_TYPE_HSC_RESERVED_1 = 45,
322    AIS_TYPE_HSC_RESERVED_2 = 46,
323    AIS_TYPE_HSC_RESERVED_3 = 47,
324    AIS_TYPE_HSC_RESERVED_4 = 48,
325    AIS_TYPE_HSC_UNKNOWN = 49,
326    AIS_TYPE_PILOT = 50,
327    #[doc = "Search And Rescue vessel."]
328    AIS_TYPE_SAR = 51,
329    AIS_TYPE_TUG = 52,
330    AIS_TYPE_PORT_TENDER = 53,
331    #[doc = "Anti-pollution equipment."]
332    AIS_TYPE_ANTI_POLLUTION = 54,
333    AIS_TYPE_LAW_ENFORCEMENT = 55,
334    AIS_TYPE_SPARE_LOCAL_1 = 56,
335    AIS_TYPE_SPARE_LOCAL_2 = 57,
336    AIS_TYPE_MEDICAL_TRANSPORT = 58,
337    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
338    AIS_TYPE_NONECOMBATANT = 59,
339    AIS_TYPE_PASSENGER = 60,
340    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
341    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
342    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
343    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
344    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
345    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
346    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
347    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
348    AIS_TYPE_PASSENGER_UNKNOWN = 69,
349    AIS_TYPE_CARGO = 70,
350    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
351    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
352    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
353    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
354    AIS_TYPE_CARGO_RESERVED_1 = 75,
355    AIS_TYPE_CARGO_RESERVED_2 = 76,
356    AIS_TYPE_CARGO_RESERVED_3 = 77,
357    AIS_TYPE_CARGO_RESERVED_4 = 78,
358    AIS_TYPE_CARGO_UNKNOWN = 79,
359    AIS_TYPE_TANKER = 80,
360    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
361    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
362    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
363    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
364    AIS_TYPE_TANKER_RESERVED_1 = 85,
365    AIS_TYPE_TANKER_RESERVED_2 = 86,
366    AIS_TYPE_TANKER_RESERVED_3 = 87,
367    AIS_TYPE_TANKER_RESERVED_4 = 88,
368    AIS_TYPE_TANKER_UNKNOWN = 89,
369    AIS_TYPE_OTHER = 90,
370    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
371    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
372    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
373    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
374    AIS_TYPE_OTHER_RESERVED_1 = 95,
375    AIS_TYPE_OTHER_RESERVED_2 = 96,
376    AIS_TYPE_OTHER_RESERVED_3 = 97,
377    AIS_TYPE_OTHER_RESERVED_4 = 98,
378    AIS_TYPE_OTHER_UNKNOWN = 99,
379}
380impl AisType {
381    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
382}
383impl Default for AisType {
384    fn default() -> Self {
385        Self::DEFAULT
386    }
387}
388bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
389impl AttitudeTargetTypemask {
390    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
391}
392impl Default for AttitudeTargetTypemask {
393    fn default() -> Self {
394        Self::DEFAULT
395    }
396}
397#[cfg_attr(feature = "ts", derive(TS))]
398#[cfg_attr(feature = "ts", ts(export))]
399#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
401#[cfg_attr(feature = "serde", serde(tag = "type"))]
402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
403#[repr(u32)]
404#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
405pub enum AutotuneAxis {
406    #[doc = "Autotune roll axis."]
407    AUTOTUNE_AXIS_ROLL = 1,
408    #[doc = "Autotune pitch axis."]
409    AUTOTUNE_AXIS_PITCH = 2,
410    #[doc = "Autotune yaw axis."]
411    AUTOTUNE_AXIS_YAW = 4,
412}
413impl AutotuneAxis {
414    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
415}
416impl Default for AutotuneAxis {
417    fn default() -> Self {
418        Self::DEFAULT
419    }
420}
421bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
422impl CameraCapFlags {
423    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
424}
425impl Default for CameraCapFlags {
426    fn default() -> Self {
427        Self::DEFAULT
428    }
429}
430#[cfg_attr(feature = "ts", derive(TS))]
431#[cfg_attr(feature = "ts", ts(export))]
432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
434#[cfg_attr(feature = "serde", serde(tag = "type"))]
435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
436#[repr(u32)]
437#[doc = "Camera Modes."]
438pub enum CameraMode {
439    #[doc = "Camera is in image/photo capture mode."]
440    CAMERA_MODE_IMAGE = 0,
441    #[doc = "Camera is in video capture mode."]
442    CAMERA_MODE_VIDEO = 1,
443    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
444    CAMERA_MODE_IMAGE_SURVEY = 2,
445}
446impl CameraMode {
447    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
448}
449impl Default for CameraMode {
450    fn default() -> Self {
451        Self::DEFAULT
452    }
453}
454#[cfg_attr(feature = "ts", derive(TS))]
455#[cfg_attr(feature = "ts", ts(export))]
456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
458#[cfg_attr(feature = "serde", serde(tag = "type"))]
459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
460#[repr(u32)]
461#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
462pub enum CameraSource {
463    #[doc = "Default camera source."]
464    CAMERA_SOURCE_DEFAULT = 0,
465    #[doc = "RGB camera source."]
466    CAMERA_SOURCE_RGB = 1,
467    #[doc = "IR camera source."]
468    CAMERA_SOURCE_IR = 2,
469    #[doc = "NDVI camera source."]
470    CAMERA_SOURCE_NDVI = 3,
471}
472impl CameraSource {
473    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
474}
475impl Default for CameraSource {
476    fn default() -> Self {
477        Self::DEFAULT
478    }
479}
480#[cfg_attr(feature = "ts", derive(TS))]
481#[cfg_attr(feature = "ts", ts(export))]
482#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
484#[cfg_attr(feature = "serde", serde(tag = "type"))]
485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
486#[repr(u32)]
487#[doc = "Camera tracking modes"]
488pub enum CameraTrackingMode {
489    #[doc = "Not tracking"]
490    CAMERA_TRACKING_MODE_NONE = 0,
491    #[doc = "Target is a point"]
492    CAMERA_TRACKING_MODE_POINT = 1,
493    #[doc = "Target is a rectangle"]
494    CAMERA_TRACKING_MODE_RECTANGLE = 2,
495}
496impl CameraTrackingMode {
497    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
498}
499impl Default for CameraTrackingMode {
500    fn default() -> Self {
501        Self::DEFAULT
502    }
503}
504#[cfg_attr(feature = "ts", derive(TS))]
505#[cfg_attr(feature = "ts", ts(export))]
506#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
508#[cfg_attr(feature = "serde", serde(tag = "type"))]
509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
510#[repr(u32)]
511#[doc = "Camera tracking status flags"]
512pub enum CameraTrackingStatusFlags {
513    #[doc = "Camera is not tracking"]
514    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
515    #[doc = "Camera is tracking"]
516    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
517    #[doc = "Camera tracking in error state"]
518    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
519}
520impl CameraTrackingStatusFlags {
521    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
522}
523impl Default for CameraTrackingStatusFlags {
524    fn default() -> Self {
525        Self::DEFAULT
526    }
527}
528bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
529impl CameraTrackingTargetData {
530    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
531}
532impl Default for CameraTrackingTargetData {
533    fn default() -> Self {
534        Self::DEFAULT
535    }
536}
537#[cfg_attr(feature = "ts", derive(TS))]
538#[cfg_attr(feature = "ts", ts(export))]
539#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
540#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
541#[cfg_attr(feature = "serde", serde(tag = "type"))]
542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
543#[repr(u32)]
544#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
545pub enum CameraZoomType {
546    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
547    ZOOM_TYPE_STEP = 0,
548    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
549    ZOOM_TYPE_CONTINUOUS = 1,
550    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
551    ZOOM_TYPE_RANGE = 2,
552    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
553    ZOOM_TYPE_FOCAL_LENGTH = 3,
554    #[doc = "Zoom value as horizontal field of view in degrees."]
555    ZOOM_TYPE_HORIZONTAL_FOV = 4,
556}
557impl CameraZoomType {
558    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
559}
560impl Default for CameraZoomType {
561    fn default() -> Self {
562        Self::DEFAULT
563    }
564}
565#[cfg_attr(feature = "ts", derive(TS))]
566#[cfg_attr(feature = "ts", ts(export))]
567#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
569#[cfg_attr(feature = "serde", serde(tag = "type"))]
570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
571#[repr(u32)]
572pub enum CanFilterOp {
573    CAN_FILTER_REPLACE = 0,
574    CAN_FILTER_ADD = 1,
575    CAN_FILTER_REMOVE = 2,
576}
577impl CanFilterOp {
578    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
579}
580impl Default for CanFilterOp {
581    fn default() -> Self {
582        Self::DEFAULT
583    }
584}
585#[cfg_attr(feature = "ts", derive(TS))]
586#[cfg_attr(feature = "ts", ts(export))]
587#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
589#[cfg_attr(feature = "serde", serde(tag = "type"))]
590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
591#[repr(u32)]
592#[doc = "Possible responses from a CELLULAR_CONFIG message."]
593pub enum CellularConfigResponse {
594    #[doc = "Changes accepted."]
595    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
596    #[doc = "Invalid APN."]
597    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
598    #[doc = "Invalid PIN."]
599    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
600    #[doc = "Changes rejected."]
601    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
602    #[doc = "PUK is required to unblock SIM card."]
603    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
604}
605impl CellularConfigResponse {
606    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
607}
608impl Default for CellularConfigResponse {
609    fn default() -> Self {
610        Self::DEFAULT
611    }
612}
613#[cfg_attr(feature = "ts", derive(TS))]
614#[cfg_attr(feature = "ts", ts(export))]
615#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
617#[cfg_attr(feature = "serde", serde(tag = "type"))]
618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
619#[repr(u32)]
620#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
621pub enum CellularNetworkFailedReason {
622    #[doc = "No error"]
623    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
624    #[doc = "Error state is unknown"]
625    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
626    #[doc = "SIM is required for the modem but missing"]
627    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
628    #[doc = "SIM is available, but not usable for connection"]
629    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
630}
631impl CellularNetworkFailedReason {
632    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
633}
634impl Default for CellularNetworkFailedReason {
635    fn default() -> Self {
636        Self::DEFAULT
637    }
638}
639#[cfg_attr(feature = "ts", derive(TS))]
640#[cfg_attr(feature = "ts", ts(export))]
641#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
643#[cfg_attr(feature = "serde", serde(tag = "type"))]
644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
645#[repr(u32)]
646#[doc = "Cellular network radio type"]
647pub enum CellularNetworkRadioType {
648    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
649    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
650    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
651    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
652    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
653}
654impl CellularNetworkRadioType {
655    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
656}
657impl Default for CellularNetworkRadioType {
658    fn default() -> Self {
659        Self::DEFAULT
660    }
661}
662#[cfg_attr(feature = "ts", derive(TS))]
663#[cfg_attr(feature = "ts", ts(export))]
664#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
666#[cfg_attr(feature = "serde", serde(tag = "type"))]
667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
668#[repr(u32)]
669#[doc = "These flags encode the cellular network status"]
670pub enum CellularStatusFlag {
671    #[doc = "State unknown or not reportable."]
672    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
673    #[doc = "Modem is unusable"]
674    CELLULAR_STATUS_FLAG_FAILED = 1,
675    #[doc = "Modem is being initialized"]
676    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
677    #[doc = "Modem is locked"]
678    CELLULAR_STATUS_FLAG_LOCKED = 3,
679    #[doc = "Modem is not enabled and is powered down"]
680    CELLULAR_STATUS_FLAG_DISABLED = 4,
681    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
682    CELLULAR_STATUS_FLAG_DISABLING = 5,
683    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
684    CELLULAR_STATUS_FLAG_ENABLING = 6,
685    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
686    CELLULAR_STATUS_FLAG_ENABLED = 7,
687    #[doc = "Modem is searching for a network provider to register"]
688    CELLULAR_STATUS_FLAG_SEARCHING = 8,
689    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
690    CELLULAR_STATUS_FLAG_REGISTERED = 9,
691    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
692    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
693    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
694    CELLULAR_STATUS_FLAG_CONNECTING = 11,
695    #[doc = "One or more packet data bearers is active and connected"]
696    CELLULAR_STATUS_FLAG_CONNECTED = 12,
697}
698impl CellularStatusFlag {
699    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
700}
701impl Default for CellularStatusFlag {
702    fn default() -> Self {
703        Self::DEFAULT
704    }
705}
706#[cfg_attr(feature = "ts", derive(TS))]
707#[cfg_attr(feature = "ts", ts(export))]
708#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
710#[cfg_attr(feature = "serde", serde(tag = "type"))]
711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
712#[repr(u32)]
713#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
714pub enum CompMetadataType {
715    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
716    COMP_METADATA_TYPE_GENERAL = 0,
717    #[doc = "Parameter meta data."]
718    COMP_METADATA_TYPE_PARAMETER = 1,
719    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
720    COMP_METADATA_TYPE_COMMANDS = 2,
721    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
722    COMP_METADATA_TYPE_PERIPHERALS = 3,
723    #[doc = "Meta data for the events interface."]
724    COMP_METADATA_TYPE_EVENTS = 4,
725    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
726    COMP_METADATA_TYPE_ACTUATORS = 5,
727}
728impl CompMetadataType {
729    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
730}
731impl Default for CompMetadataType {
732    fn default() -> Self {
733        Self::DEFAULT
734    }
735}
736#[cfg_attr(feature = "ts", derive(TS))]
737#[cfg_attr(feature = "ts", ts(export))]
738#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
740#[cfg_attr(feature = "serde", serde(tag = "type"))]
741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
742#[repr(u32)]
743#[doc = "Indicates the ESC connection type."]
744pub enum EscConnectionType {
745    #[doc = "Traditional PPM ESC."]
746    ESC_CONNECTION_TYPE_PPM = 0,
747    #[doc = "Serial Bus connected ESC."]
748    ESC_CONNECTION_TYPE_SERIAL = 1,
749    #[doc = "One Shot PPM ESC."]
750    ESC_CONNECTION_TYPE_ONESHOT = 2,
751    #[doc = "I2C ESC."]
752    ESC_CONNECTION_TYPE_I2C = 3,
753    #[doc = "CAN-Bus ESC."]
754    ESC_CONNECTION_TYPE_CAN = 4,
755    #[doc = "DShot ESC."]
756    ESC_CONNECTION_TYPE_DSHOT = 5,
757}
758impl EscConnectionType {
759    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
760}
761impl Default for EscConnectionType {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
767impl EscFailureFlags {
768    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
769}
770impl Default for EscFailureFlags {
771    fn default() -> Self {
772        Self::DEFAULT
773    }
774}
775bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
776impl EstimatorStatusFlags {
777    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
778}
779impl Default for EstimatorStatusFlags {
780    fn default() -> Self {
781        Self::DEFAULT
782    }
783}
784#[cfg_attr(feature = "ts", derive(TS))]
785#[cfg_attr(feature = "ts", ts(export))]
786#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
788#[cfg_attr(feature = "serde", serde(tag = "type"))]
789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
790#[repr(u32)]
791#[doc = "List of possible failure type to inject."]
792pub enum FailureType {
793    #[doc = "No failure injected, used to reset a previous failure."]
794    FAILURE_TYPE_OK = 0,
795    #[doc = "Sets unit off, so completely non-responsive."]
796    FAILURE_TYPE_OFF = 1,
797    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
798    FAILURE_TYPE_STUCK = 2,
799    #[doc = "Unit is reporting complete garbage."]
800    FAILURE_TYPE_GARBAGE = 3,
801    #[doc = "Unit is consistently wrong."]
802    FAILURE_TYPE_WRONG = 4,
803    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
804    FAILURE_TYPE_SLOW = 5,
805    #[doc = "Data of unit is delayed in time."]
806    FAILURE_TYPE_DELAYED = 6,
807    #[doc = "Unit is sometimes working, sometimes not."]
808    FAILURE_TYPE_INTERMITTENT = 7,
809}
810impl FailureType {
811    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
812}
813impl Default for FailureType {
814    fn default() -> Self {
815        Self::DEFAULT
816    }
817}
818#[cfg_attr(feature = "ts", derive(TS))]
819#[cfg_attr(feature = "ts", ts(export))]
820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
822#[cfg_attr(feature = "serde", serde(tag = "type"))]
823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
824#[repr(u32)]
825#[doc = "List of possible units where failures can be injected."]
826pub enum FailureUnit {
827    FAILURE_UNIT_SENSOR_GYRO = 0,
828    FAILURE_UNIT_SENSOR_ACCEL = 1,
829    FAILURE_UNIT_SENSOR_MAG = 2,
830    FAILURE_UNIT_SENSOR_BARO = 3,
831    FAILURE_UNIT_SENSOR_GPS = 4,
832    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
833    FAILURE_UNIT_SENSOR_VIO = 6,
834    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
835    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
836    FAILURE_UNIT_SYSTEM_BATTERY = 100,
837    FAILURE_UNIT_SYSTEM_MOTOR = 101,
838    FAILURE_UNIT_SYSTEM_SERVO = 102,
839    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
840    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
841    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
842}
843impl FailureUnit {
844    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
845}
846impl Default for FailureUnit {
847    fn default() -> Self {
848        Self::DEFAULT
849    }
850}
851#[cfg_attr(feature = "ts", derive(TS))]
852#[cfg_attr(feature = "ts", ts(export))]
853#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
855#[cfg_attr(feature = "serde", serde(tag = "type"))]
856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
857#[repr(u32)]
858pub enum FenceBreach {
859    #[doc = "No last fence breach"]
860    FENCE_BREACH_NONE = 0,
861    #[doc = "Breached minimum altitude"]
862    FENCE_BREACH_MINALT = 1,
863    #[doc = "Breached maximum altitude"]
864    FENCE_BREACH_MAXALT = 2,
865    #[doc = "Breached fence boundary"]
866    FENCE_BREACH_BOUNDARY = 3,
867}
868impl FenceBreach {
869    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
870}
871impl Default for FenceBreach {
872    fn default() -> Self {
873        Self::DEFAULT
874    }
875}
876#[cfg_attr(feature = "ts", derive(TS))]
877#[cfg_attr(feature = "ts", ts(export))]
878#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
880#[cfg_attr(feature = "serde", serde(tag = "type"))]
881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
882#[repr(u32)]
883#[doc = "Actions being taken to mitigate/prevent fence breach"]
884pub enum FenceMitigate {
885    #[doc = "Unknown"]
886    FENCE_MITIGATE_UNKNOWN = 0,
887    #[doc = "No actions being taken"]
888    FENCE_MITIGATE_NONE = 1,
889    #[doc = "Velocity limiting active to prevent breach"]
890    FENCE_MITIGATE_VEL_LIMIT = 2,
891}
892impl FenceMitigate {
893    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
894}
895impl Default for FenceMitigate {
896    fn default() -> Self {
897        Self::DEFAULT
898    }
899}
900#[cfg_attr(feature = "ts", derive(TS))]
901#[cfg_attr(feature = "ts", ts(export))]
902#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
904#[cfg_attr(feature = "serde", serde(tag = "type"))]
905#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
906#[repr(u32)]
907#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
908pub enum FenceType {
909    #[doc = "Maximum altitude fence"]
910    FENCE_TYPE_ALT_MAX = 1,
911    #[doc = "Circle fence"]
912    FENCE_TYPE_CIRCLE = 2,
913    #[doc = "Polygon fence"]
914    FENCE_TYPE_POLYGON = 4,
915    #[doc = "Minimum altitude fence"]
916    FENCE_TYPE_ALT_MIN = 8,
917}
918impl FenceType {
919    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
920}
921impl Default for FenceType {
922    fn default() -> Self {
923        Self::DEFAULT
924    }
925}
926#[cfg_attr(feature = "ts", derive(TS))]
927#[cfg_attr(feature = "ts", ts(export))]
928#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
930#[cfg_attr(feature = "serde", serde(tag = "type"))]
931#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
932#[repr(u32)]
933#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
934pub enum FirmwareVersionType {
935    #[doc = "development release"]
936    FIRMWARE_VERSION_TYPE_DEV = 0,
937    #[doc = "alpha release"]
938    FIRMWARE_VERSION_TYPE_ALPHA = 64,
939    #[doc = "beta release"]
940    FIRMWARE_VERSION_TYPE_BETA = 128,
941    #[doc = "release candidate"]
942    FIRMWARE_VERSION_TYPE_RC = 192,
943    #[doc = "official stable release"]
944    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
945}
946impl FirmwareVersionType {
947    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
948}
949impl Default for FirmwareVersionType {
950    fn default() -> Self {
951        Self::DEFAULT
952    }
953}
954bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "CONTROL_STATUS flags."] pub struct GcsControlStatusFlags : u8 { # [doc = "If set, this CONTROL_STATUS publishes the controlling GCS for the whole system. If unset, the CONTROL_STATUS indicates the controlling GCS for just the component emitting the message. Note that to request control of the system a GCS should send MAV_CMD_REQUEST_OPERATOR_CONTROL to the component emitting CONTROL_STATUS with this flag set."] const GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER = 1 ; # [doc = "Takeover allowed (requests for control will be granted). If not set requests for control will be rejected, but the controlling GCS will be notified (and may release control or allow takeover)."] const GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED = 2 ; } }
955impl GcsControlStatusFlags {
956    pub const DEFAULT: Self = Self::GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER;
957}
958impl Default for GcsControlStatusFlags {
959    fn default() -> Self {
960        Self::DEFAULT
961    }
962}
963bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
964impl GimbalDeviceCapFlags {
965    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
966}
967impl Default for GimbalDeviceCapFlags {
968    fn default() -> Self {
969        Self::DEFAULT
970    }
971}
972bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
973impl GimbalDeviceErrorFlags {
974    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
975}
976impl Default for GimbalDeviceErrorFlags {
977    fn default() -> Self {
978        Self::DEFAULT
979    }
980}
981bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
982impl GimbalDeviceFlags {
983    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
984}
985impl Default for GimbalDeviceFlags {
986    fn default() -> Self {
987        Self::DEFAULT
988    }
989}
990bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
991impl GimbalManagerCapFlags {
992    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
993}
994impl Default for GimbalManagerCapFlags {
995    fn default() -> Self {
996        Self::DEFAULT
997    }
998}
999bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1000impl GimbalManagerFlags {
1001    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1002}
1003impl Default for GimbalManagerFlags {
1004    fn default() -> Self {
1005        Self::DEFAULT
1006    }
1007}
1008#[cfg_attr(feature = "ts", derive(TS))]
1009#[cfg_attr(feature = "ts", ts(export))]
1010#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1012#[cfg_attr(feature = "serde", serde(tag = "type"))]
1013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1014#[repr(u32)]
1015#[doc = "Signal authentication state in a GPS receiver."]
1016pub enum GpsAuthenticationState {
1017    #[doc = "The GPS receiver does not provide GPS signal authentication info."]
1018    GPS_AUTHENTICATION_STATE_UNKNOWN = 0,
1019    #[doc = "The GPS receiver is initializing signal authentication."]
1020    GPS_AUTHENTICATION_STATE_INITIALIZING = 1,
1021    #[doc = "The GPS receiver encountered an error while initializing signal authentication."]
1022    GPS_AUTHENTICATION_STATE_ERROR = 2,
1023    #[doc = "The GPS receiver has correctly authenticated all signals."]
1024    GPS_AUTHENTICATION_STATE_OK = 3,
1025    #[doc = "GPS signal authentication is disabled on the receiver."]
1026    GPS_AUTHENTICATION_STATE_DISABLED = 4,
1027}
1028impl GpsAuthenticationState {
1029    pub const DEFAULT: Self = Self::GPS_AUTHENTICATION_STATE_UNKNOWN;
1030}
1031impl Default for GpsAuthenticationState {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Type of GPS fix"]
1044pub enum GpsFixType {
1045    #[doc = "No GPS connected"]
1046    GPS_FIX_TYPE_NO_GPS = 0,
1047    #[doc = "No position information, GPS is connected"]
1048    GPS_FIX_TYPE_NO_FIX = 1,
1049    #[doc = "2D position"]
1050    GPS_FIX_TYPE_2D_FIX = 2,
1051    #[doc = "3D position"]
1052    GPS_FIX_TYPE_3D_FIX = 3,
1053    #[doc = "DGPS/SBAS aided 3D position"]
1054    GPS_FIX_TYPE_DGPS = 4,
1055    #[doc = "RTK float, 3D position"]
1056    GPS_FIX_TYPE_RTK_FLOAT = 5,
1057    #[doc = "RTK Fixed, 3D position"]
1058    GPS_FIX_TYPE_RTK_FIXED = 6,
1059    #[doc = "Static fixed, typically used for base stations"]
1060    GPS_FIX_TYPE_STATIC = 7,
1061    #[doc = "PPP, 3D position."]
1062    GPS_FIX_TYPE_PPP = 8,
1063}
1064impl GpsFixType {
1065    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1066}
1067impl Default for GpsFixType {
1068    fn default() -> Self {
1069        Self::DEFAULT
1070    }
1071}
1072bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1073impl GpsInputIgnoreFlags {
1074    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1075}
1076impl Default for GpsInputIgnoreFlags {
1077    fn default() -> Self {
1078        Self::DEFAULT
1079    }
1080}
1081#[cfg_attr(feature = "ts", derive(TS))]
1082#[cfg_attr(feature = "ts", ts(export))]
1083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1085#[cfg_attr(feature = "serde", serde(tag = "type"))]
1086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1087#[repr(u32)]
1088#[doc = "Signal jamming state in a GPS receiver."]
1089pub enum GpsJammingState {
1090    #[doc = "The GPS receiver does not provide GPS signal jamming info."]
1091    GPS_JAMMING_STATE_UNKNOWN = 0,
1092    #[doc = "The GPS receiver detected no signal jamming."]
1093    GPS_JAMMING_STATE_OK = 1,
1094    #[doc = "The GPS receiver detected and mitigated signal jamming."]
1095    GPS_JAMMING_STATE_MITIGATED = 2,
1096    #[doc = "The GPS receiver detected signal jamming."]
1097    GPS_JAMMING_STATE_DETECTED = 3,
1098}
1099impl GpsJammingState {
1100    pub const DEFAULT: Self = Self::GPS_JAMMING_STATE_UNKNOWN;
1101}
1102impl Default for GpsJammingState {
1103    fn default() -> Self {
1104        Self::DEFAULT
1105    }
1106}
1107#[cfg_attr(feature = "ts", derive(TS))]
1108#[cfg_attr(feature = "ts", ts(export))]
1109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1111#[cfg_attr(feature = "serde", serde(tag = "type"))]
1112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1113#[repr(u32)]
1114#[doc = "State of RAIM processing."]
1115pub enum GpsRaimState {
1116    #[doc = "RAIM capability is unknown."]
1117    GPS_RAIM_STATE_UNKNOWN = 0,
1118    #[doc = "RAIM is disabled."]
1119    GPS_RAIM_STATE_DISABLED = 1,
1120    #[doc = "RAIM integrity check was successful."]
1121    GPS_RAIM_STATE_OK = 2,
1122    #[doc = "RAIM integrity check failed."]
1123    GPS_RAIM_STATE_FAILED = 3,
1124}
1125impl GpsRaimState {
1126    pub const DEFAULT: Self = Self::GPS_RAIM_STATE_UNKNOWN;
1127}
1128impl Default for GpsRaimState {
1129    fn default() -> Self {
1130        Self::DEFAULT
1131    }
1132}
1133#[cfg_attr(feature = "ts", derive(TS))]
1134#[cfg_attr(feature = "ts", ts(export))]
1135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1137#[cfg_attr(feature = "serde", serde(tag = "type"))]
1138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1139#[repr(u32)]
1140#[doc = "Signal spoofing state in a GPS receiver."]
1141pub enum GpsSpoofingState {
1142    #[doc = "The GPS receiver does not provide GPS signal spoofing info."]
1143    GPS_SPOOFING_STATE_UNKNOWN = 0,
1144    #[doc = "The GPS receiver detected no signal spoofing."]
1145    GPS_SPOOFING_STATE_OK = 1,
1146    #[doc = "The GPS receiver detected and mitigated signal spoofing."]
1147    GPS_SPOOFING_STATE_MITIGATED = 2,
1148    #[doc = "The GPS receiver detected signal spoofing but still has a fix."]
1149    GPS_SPOOFING_STATE_DETECTED = 3,
1150}
1151impl GpsSpoofingState {
1152    pub const DEFAULT: Self = Self::GPS_SPOOFING_STATE_UNKNOWN;
1153}
1154impl Default for GpsSpoofingState {
1155    fn default() -> Self {
1156        Self::DEFAULT
1157    }
1158}
1159bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags indicating errors in a GPS receiver."] pub struct GpsSystemErrorFlags : u32 { # [doc = "There are problems with incoming correction streams."] const GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS = 1 ; # [doc = "There are problems with the configuration."] const GPS_SYSTEM_ERROR_CONFIGURATION = 2 ; # [doc = "There are problems with the software on the GPS receiver."] const GPS_SYSTEM_ERROR_SOFTWARE = 4 ; # [doc = "There are problems with an antenna connected to the GPS receiver."] const GPS_SYSTEM_ERROR_ANTENNA = 8 ; # [doc = "There are problems handling all incoming events."] const GPS_SYSTEM_ERROR_EVENT_CONGESTION = 16 ; # [doc = "The GPS receiver CPU is overloaded."] const GPS_SYSTEM_ERROR_CPU_OVERLOAD = 32 ; # [doc = "The GPS receiver is experiencing output congestion."] const GPS_SYSTEM_ERROR_OUTPUT_CONGESTION = 64 ; } }
1160impl GpsSystemErrorFlags {
1161    pub const DEFAULT: Self = Self::GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS;
1162}
1163impl Default for GpsSystemErrorFlags {
1164    fn default() -> Self {
1165        Self::DEFAULT
1166    }
1167}
1168#[cfg_attr(feature = "ts", derive(TS))]
1169#[cfg_attr(feature = "ts", ts(export))]
1170#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1172#[cfg_attr(feature = "serde", serde(tag = "type"))]
1173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1174#[repr(u32)]
1175#[doc = "Gripper actions."]
1176pub enum GripperActions {
1177    #[doc = "Gripper release cargo."]
1178    GRIPPER_ACTION_RELEASE = 0,
1179    #[doc = "Gripper grab onto cargo."]
1180    GRIPPER_ACTION_GRAB = 1,
1181}
1182impl GripperActions {
1183    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1184}
1185impl Default for GripperActions {
1186    fn default() -> Self {
1187        Self::DEFAULT
1188    }
1189}
1190bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1191impl HighresImuUpdatedFlags {
1192    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1193}
1194impl Default for HighresImuUpdatedFlags {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1200impl HilActuatorControlsFlags {
1201    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1202}
1203impl Default for HilActuatorControlsFlags {
1204    fn default() -> Self {
1205        Self::DEFAULT
1206    }
1207}
1208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1209impl HilSensorUpdatedFlags {
1210    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1211}
1212impl Default for HilSensorUpdatedFlags {
1213    fn default() -> Self {
1214        Self::DEFAULT
1215    }
1216}
1217bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1218impl HlFailureFlag {
1219    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1220}
1221impl Default for HlFailureFlag {
1222    fn default() -> Self {
1223        Self::DEFAULT
1224    }
1225}
1226bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1227impl IlluminatorErrorFlags {
1228    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1229}
1230impl Default for IlluminatorErrorFlags {
1231    fn default() -> Self {
1232        Self::DEFAULT
1233    }
1234}
1235#[cfg_attr(feature = "ts", derive(TS))]
1236#[cfg_attr(feature = "ts", ts(export))]
1237#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1239#[cfg_attr(feature = "serde", serde(tag = "type"))]
1240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1241#[repr(u32)]
1242#[doc = "Modes of illuminator"]
1243pub enum IlluminatorMode {
1244    #[doc = "Illuminator mode is not specified/unknown"]
1245    ILLUMINATOR_MODE_UNKNOWN = 0,
1246    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1247    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1248    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1249    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1250}
1251impl IlluminatorMode {
1252    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1253}
1254impl Default for IlluminatorMode {
1255    fn default() -> Self {
1256        Self::DEFAULT
1257    }
1258}
1259#[cfg_attr(feature = "ts", derive(TS))]
1260#[cfg_attr(feature = "ts", ts(export))]
1261#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1263#[cfg_attr(feature = "serde", serde(tag = "type"))]
1264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1265#[repr(u32)]
1266#[doc = "Type of landing target"]
1267pub enum LandingTargetType {
1268    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1269    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1270    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1271    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1272    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1273    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1274    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1275    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1276}
1277impl LandingTargetType {
1278    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1279}
1280impl Default for LandingTargetType {
1281    fn default() -> Self {
1282        Self::DEFAULT
1283    }
1284}
1285#[cfg_attr(feature = "ts", derive(TS))]
1286#[cfg_attr(feature = "ts", ts(export))]
1287#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1289#[cfg_attr(feature = "serde", serde(tag = "type"))]
1290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1291#[repr(u32)]
1292pub enum MagCalStatus {
1293    MAG_CAL_NOT_STARTED = 0,
1294    MAG_CAL_WAITING_TO_START = 1,
1295    MAG_CAL_RUNNING_STEP_ONE = 2,
1296    MAG_CAL_RUNNING_STEP_TWO = 3,
1297    MAG_CAL_SUCCESS = 4,
1298    MAG_CAL_FAILED = 5,
1299    MAG_CAL_BAD_ORIENTATION = 6,
1300    MAG_CAL_BAD_RADIUS = 7,
1301}
1302impl MagCalStatus {
1303    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1304}
1305impl Default for MagCalStatus {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[cfg_attr(feature = "ts", derive(TS))]
1311#[cfg_attr(feature = "ts", ts(export))]
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317pub enum MavArmAuthDeniedReason {
1318    #[doc = "Not a specific reason"]
1319    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1320    #[doc = "Authorizer will send the error as string to GCS"]
1321    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1322    #[doc = "At least one waypoint have a invalid value"]
1323    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1324    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1325    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1326    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1327    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1328    #[doc = "Weather is not good to fly"]
1329    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1330}
1331impl MavArmAuthDeniedReason {
1332    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1333}
1334impl Default for MavArmAuthDeniedReason {
1335    fn default() -> Self {
1336        Self::DEFAULT
1337    }
1338}
1339#[cfg_attr(feature = "ts", derive(TS))]
1340#[cfg_attr(feature = "ts", ts(export))]
1341#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1343#[cfg_attr(feature = "serde", serde(tag = "type"))]
1344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1345#[repr(u32)]
1346#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1347pub enum MavAutopilot {
1348    #[doc = "Generic autopilot, full support for everything"]
1349    MAV_AUTOPILOT_GENERIC = 0,
1350    #[doc = "Reserved for future use."]
1351    MAV_AUTOPILOT_RESERVED = 1,
1352    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1353    MAV_AUTOPILOT_SLUGS = 2,
1354    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1355    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1356    #[doc = "OpenPilot, <http://openpilot.org>"]
1357    MAV_AUTOPILOT_OPENPILOT = 4,
1358    #[doc = "Generic autopilot only supporting simple waypoints"]
1359    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1360    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1361    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1362    #[doc = "Generic autopilot supporting the full mission command set"]
1363    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1364    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1365    MAV_AUTOPILOT_INVALID = 8,
1366    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1367    MAV_AUTOPILOT_PPZ = 9,
1368    #[doc = "UAV Dev Board"]
1369    MAV_AUTOPILOT_UDB = 10,
1370    #[doc = "FlexiPilot"]
1371    MAV_AUTOPILOT_FP = 11,
1372    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1373    MAV_AUTOPILOT_PX4 = 12,
1374    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1375    MAV_AUTOPILOT_SMACCMPILOT = 13,
1376    #[doc = "AutoQuad -- <http://autoquad.org>"]
1377    MAV_AUTOPILOT_AUTOQUAD = 14,
1378    #[doc = "Armazila -- <http://armazila.com>"]
1379    MAV_AUTOPILOT_ARMAZILA = 15,
1380    #[doc = "Aerob -- <http://aerob.ru>"]
1381    MAV_AUTOPILOT_AEROB = 16,
1382    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1383    MAV_AUTOPILOT_ASLUAV = 17,
1384    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1385    MAV_AUTOPILOT_SMARTAP = 18,
1386    #[doc = "AirRails - <http://uaventure.com>"]
1387    MAV_AUTOPILOT_AIRRAILS = 19,
1388    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1389    MAV_AUTOPILOT_REFLEX = 20,
1390}
1391impl MavAutopilot {
1392    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1393}
1394impl Default for MavAutopilot {
1395    fn default() -> Self {
1396        Self::DEFAULT
1397    }
1398}
1399#[cfg_attr(feature = "ts", derive(TS))]
1400#[cfg_attr(feature = "ts", ts(export))]
1401#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1403#[cfg_attr(feature = "serde", serde(tag = "type"))]
1404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1405#[repr(u32)]
1406#[doc = "Enumeration for battery charge states."]
1407pub enum MavBatteryChargeState {
1408    #[doc = "Low battery state is not provided"]
1409    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1410    #[doc = "Battery is not in low state. Normal operation."]
1411    MAV_BATTERY_CHARGE_STATE_OK = 1,
1412    #[doc = "Battery state is low, warn and monitor close."]
1413    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1414    #[doc = "Battery state is critical, return or abort immediately."]
1415    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1416    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1417    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1418    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1419    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1420    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1421    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1422    #[doc = "Battery is charging."]
1423    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1424}
1425impl MavBatteryChargeState {
1426    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1427}
1428impl Default for MavBatteryChargeState {
1429    fn default() -> Self {
1430        Self::DEFAULT
1431    }
1432}
1433bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1434impl MavBatteryFault {
1435    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1436}
1437impl Default for MavBatteryFault {
1438    fn default() -> Self {
1439        Self::DEFAULT
1440    }
1441}
1442#[cfg_attr(feature = "ts", derive(TS))]
1443#[cfg_attr(feature = "ts", ts(export))]
1444#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1446#[cfg_attr(feature = "serde", serde(tag = "type"))]
1447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1448#[repr(u32)]
1449#[doc = "Enumeration of battery functions"]
1450pub enum MavBatteryFunction {
1451    #[doc = "Battery function is unknown"]
1452    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1453    #[doc = "Battery supports all flight systems"]
1454    MAV_BATTERY_FUNCTION_ALL = 1,
1455    #[doc = "Battery for the propulsion system"]
1456    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1457    #[doc = "Avionics battery"]
1458    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1459    #[doc = "Payload battery"]
1460    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1461}
1462impl MavBatteryFunction {
1463    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1464}
1465impl Default for MavBatteryFunction {
1466    fn default() -> Self {
1467        Self::DEFAULT
1468    }
1469}
1470#[cfg_attr(feature = "ts", derive(TS))]
1471#[cfg_attr(feature = "ts", ts(export))]
1472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1474#[cfg_attr(feature = "serde", serde(tag = "type"))]
1475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1476#[repr(u32)]
1477#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1478pub enum MavBatteryMode {
1479    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1480    MAV_BATTERY_MODE_UNKNOWN = 0,
1481    #[doc = "Battery is auto discharging (towards storage level)."]
1482    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1483    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1484    MAV_BATTERY_MODE_HOT_SWAP = 2,
1485}
1486impl MavBatteryMode {
1487    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1488}
1489impl Default for MavBatteryMode {
1490    fn default() -> Self {
1491        Self::DEFAULT
1492    }
1493}
1494bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Battery status flags for fault, health and state indication."] pub struct MavBatteryStatusFlags : u32 { # [doc = "The battery is not ready to use (fly).           Set if the battery has faults or other conditions that make it unsafe to fly with.           Note: It will be the logical OR of other status bits (chosen by the manufacturer/integrator)."] const MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE = 1 ; # [doc = "Battery is charging."] const MAV_BATTERY_STATUS_FLAGS_CHARGING = 2 ; # [doc = "Battery is cell balancing (during charging).           Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE may be set)."] const MAV_BATTERY_STATUS_FLAGS_CELL_BALANCING = 4 ; # [doc = "Battery cells are not balanced.           Not ready to use."] const MAV_BATTERY_STATUS_FLAGS_FAULT_CELL_IMBALANCE = 8 ; # [doc = "Battery is auto discharging (towards storage level).           Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE would be set)."] const MAV_BATTERY_STATUS_FLAGS_AUTO_DISCHARGING = 16 ; # [doc = "Battery requires service (not safe to fly).           This is set at vendor discretion.           It is likely to be set for most faults, and may also be set according to a maintenance schedule (such as age, or number of recharge cycles, etc.)."] const MAV_BATTERY_STATUS_FLAGS_REQUIRES_SERVICE = 32 ; # [doc = "Battery is faulty and cannot be repaired (not safe to fly).           This is set at vendor discretion.           The battery should be disposed of safely."] const MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY = 64 ; # [doc = "Automatic battery protection monitoring is enabled.           When enabled, the system will monitor for certain kinds of faults, such as cells being over-voltage.           If a fault is triggered then and protections are enabled then a safety fault (MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM) will be set and power from the battery will be stopped.           Note that battery protection monitoring should only be enabled when the vehicle is landed. Once the vehicle is armed, or starts moving, the protections should be disabled to prevent false positives from disabling the output."] const MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED = 128 ; # [doc = "The battery fault protection system had detected a fault and cut all power from the battery.           This will only trigger if MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED is set.           Other faults like MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT may also be set, indicating the cause of the protection fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM = 256 ; # [doc = "One or more cells are above their maximum voltage rating."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT = 512 ; # [doc = "One or more cells are below their minimum voltage rating.           A battery that had deep-discharged might be irrepairably damaged, and set both MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT and MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY."] const MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT = 1024 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_TEMPERATURE = 2048 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_TEMPERATURE = 4096 ; # [doc = "Over-current fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_CURRENT = 8192 ; # [doc = "Short circuit event detected.           The battery may or may not be safe to use (check other flags)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_SHORT_CIRCUIT = 16384 ; # [doc = "Voltage not compatible with power rail voltage (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_VOLTAGE = 32768 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_FIRMWARE = 65536 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 131072 ; # [doc = "Battery capacity_consumed and capacity_remaining values are relative to a full battery (they sum to the total capacity of the battery).           This flag would be set for a smart battery that can accurately determine its remaining charge across vehicle reboots and discharge/recharge cycles.           If unset the capacity_consumed indicates the consumption since vehicle power-on, as measured using a power monitor. The capacity_remaining, if provided, indicates the estimated remaining capacity on the assumption that the battery was full on vehicle boot.           If unset a GCS is recommended to advise that users fully charge the battery on power on."] const MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL = 262144 ; # [doc = "Reserved (not used). If set, this will indicate that an additional status field exists for higher status values."] const MAV_BATTERY_STATUS_FLAGS_EXTENDED = 2147483648 ; } }
1495impl MavBatteryStatusFlags {
1496    pub const DEFAULT: Self = Self::MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE;
1497}
1498impl Default for MavBatteryStatusFlags {
1499    fn default() -> Self {
1500        Self::DEFAULT
1501    }
1502}
1503#[cfg_attr(feature = "ts", derive(TS))]
1504#[cfg_attr(feature = "ts", ts(export))]
1505#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1507#[cfg_attr(feature = "serde", serde(tag = "type"))]
1508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1509#[repr(u32)]
1510#[doc = "Enumeration of battery types"]
1511pub enum MavBatteryType {
1512    #[doc = "Not specified."]
1513    MAV_BATTERY_TYPE_UNKNOWN = 0,
1514    #[doc = "Lithium polymer battery"]
1515    MAV_BATTERY_TYPE_LIPO = 1,
1516    #[doc = "Lithium-iron-phosphate battery"]
1517    MAV_BATTERY_TYPE_LIFE = 2,
1518    #[doc = "Lithium-ION battery"]
1519    MAV_BATTERY_TYPE_LION = 3,
1520    #[doc = "Nickel metal hydride battery"]
1521    MAV_BATTERY_TYPE_NIMH = 4,
1522}
1523impl MavBatteryType {
1524    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1525}
1526impl Default for MavBatteryType {
1527    fn default() -> Self {
1528        Self::DEFAULT
1529    }
1530}
1531#[cfg_attr(feature = "ts", derive(TS))]
1532#[cfg_attr(feature = "ts", ts(export))]
1533#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1535#[cfg_attr(feature = "serde", serde(tag = "type"))]
1536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1537#[repr(u32)]
1538#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1539pub enum MavCmd {
1540    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1541    MAV_CMD_NAV_WAYPOINT = 16,
1542    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1543    MAV_CMD_NAV_LOITER_UNLIM = 17,
1544    #[doc = "Loiter around this waypoint for X turns"]
1545    MAV_CMD_NAV_LOITER_TURNS = 18,
1546    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1547    MAV_CMD_NAV_LOITER_TIME = 19,
1548    #[doc = "Return to launch location"]
1549    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1550    #[doc = "Land at location."]
1551    MAV_CMD_NAV_LAND = 21,
1552    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1553    MAV_CMD_NAV_TAKEOFF = 22,
1554    #[doc = "Land at local position (local frame only)"]
1555    MAV_CMD_NAV_LAND_LOCAL = 23,
1556    #[doc = "Takeoff from local position (local frame only)"]
1557    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1558    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1559    MAV_CMD_NAV_FOLLOW = 25,
1560    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1561    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1562    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1563    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1564    #[doc = "Begin following a target"]
1565    MAV_CMD_DO_FOLLOW = 32,
1566    #[doc = "Reposition the MAV after a follow target command has been sent"]
1567    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1568    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1569    MAV_CMD_DO_ORBIT = 34,
1570    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1571    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1572    MAV_CMD_NAV_ROI = 80,
1573    #[doc = "Control autonomous path planning on the MAV."]
1574    MAV_CMD_NAV_PATHPLANNING = 81,
1575    #[doc = "Navigate to waypoint using a spline path."]
1576    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1577    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1578    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1579    #[doc = "Land using VTOL mode"]
1580    MAV_CMD_NAV_VTOL_LAND = 85,
1581    #[doc = "hand control over to an external controller"]
1582    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1583    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1584    MAV_CMD_NAV_DELAY = 93,
1585    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1586    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1587    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1588    MAV_CMD_NAV_LAST = 95,
1589    #[doc = "Delay mission state machine."]
1590    MAV_CMD_CONDITION_DELAY = 112,
1591    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1592    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1593    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1594    MAV_CMD_CONDITION_DISTANCE = 114,
1595    #[doc = "Reach a certain target angle."]
1596    MAV_CMD_CONDITION_YAW = 115,
1597    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1598    MAV_CMD_CONDITION_LAST = 159,
1599    #[doc = "Set system mode."]
1600    MAV_CMD_DO_SET_MODE = 176,
1601    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1602    MAV_CMD_DO_JUMP = 177,
1603    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1604    MAV_CMD_DO_CHANGE_SPEED = 178,
1605    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1606    MAV_CMD_DO_SET_HOME = 179,
1607    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1608    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1609    MAV_CMD_DO_SET_PARAMETER = 180,
1610    #[doc = "Set a relay to a condition."]
1611    MAV_CMD_DO_SET_RELAY = 181,
1612    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1613    MAV_CMD_DO_REPEAT_RELAY = 182,
1614    #[doc = "Set a servo to a desired PWM value."]
1615    MAV_CMD_DO_SET_SERVO = 183,
1616    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1617    MAV_CMD_DO_REPEAT_SERVO = 184,
1618    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1619    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1620    #[doc = "Change altitude set point."]
1621    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1622    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1623    MAV_CMD_DO_SET_ACTUATOR = 187,
1624    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1625    MAV_CMD_DO_RETURN_PATH_START = 188,
1626    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1627    MAV_CMD_DO_LAND_START = 189,
1628    #[doc = "Mission command to perform a landing from a rally point."]
1629    MAV_CMD_DO_RALLY_LAND = 190,
1630    #[doc = "Mission command to safely abort an autonomous landing."]
1631    MAV_CMD_DO_GO_AROUND = 191,
1632    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1633    MAV_CMD_DO_REPOSITION = 192,
1634    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1635    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1636    #[doc = "Set moving direction to forward or reverse."]
1637    MAV_CMD_DO_SET_REVERSE = 194,
1638    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1639    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1640    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1641    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1642    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1643    MAV_CMD_DO_SET_ROI_NONE = 197,
1644    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1645    MAV_CMD_DO_SET_ROI_SYSID = 198,
1646    #[doc = "Control onboard camera system."]
1647    MAV_CMD_DO_CONTROL_VIDEO = 200,
1648    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1649    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1650    MAV_CMD_DO_SET_ROI = 201,
1651    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1652    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1653    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1654    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1655    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1656    #[doc = "Mission command to configure a camera or antenna mount"]
1657    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1658    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1659    #[doc = "Mission command to control a camera or antenna mount"]
1660    MAV_CMD_DO_MOUNT_CONTROL = 205,
1661    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1662    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1663    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1664    MAV_CMD_DO_FENCE_ENABLE = 207,
1665    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1666    MAV_CMD_DO_PARACHUTE = 208,
1667    #[doc = "Command to perform motor test."]
1668    MAV_CMD_DO_MOTOR_TEST = 209,
1669    #[doc = "Change to/from inverted flight."]
1670    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1671    #[doc = "Mission command to operate a gripper."]
1672    MAV_CMD_DO_GRIPPER = 211,
1673    #[doc = "Enable/disable autotune."]
1674    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1675    #[doc = "Sets a desired vehicle turn angle and speed change."]
1676    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1677    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1678    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1679    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1680    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1681    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1682    #[doc = "set id of master controller"]
1683    MAV_CMD_DO_GUIDED_MASTER = 221,
1684    #[doc = "Set limits for external control"]
1685    MAV_CMD_DO_GUIDED_LIMITS = 222,
1686    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1687    MAV_CMD_DO_ENGINE_CONTROL = 223,
1688    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1689    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1690    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1691    MAV_CMD_DO_LAST = 240,
1692    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1693    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1694    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1695    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1696    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1697    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1698    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1699    MAV_CMD_PREFLIGHT_STORAGE = 245,
1700    #[doc = "Request the reboot or shutdown of system components."]
1701    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1702    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1703    MAV_CMD_OVERRIDE_GOTO = 252,
1704    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1705    MAV_CMD_OBLIQUE_SURVEY = 260,
1706    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1707    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1708    #[doc = "start running a mission"]
1709    MAV_CMD_MISSION_START = 300,
1710    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1711    MAV_CMD_ACTUATOR_TEST = 310,
1712    #[doc = "Actuator configuration command."]
1713    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1714    #[doc = "Arms / Disarms a component"]
1715    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1716    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1717    MAV_CMD_RUN_PREARM_CHECKS = 401,
1718    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1719    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1720    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1721    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1722    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1723    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1724    MAV_CMD_GET_HOME_POSITION = 410,
1725    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1726    MAV_CMD_INJECT_FAILURE = 420,
1727    #[doc = "Starts receiver pairing."]
1728    MAV_CMD_START_RX_PAIR = 500,
1729    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1730    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1731    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1732    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1733    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1734    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1735    MAV_CMD_REQUEST_MESSAGE = 512,
1736    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1737    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1738    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1739    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1740    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1741    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1742    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1743    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1744    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1745    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1746    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1747    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1748    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1749    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1750    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1751    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1752    MAV_CMD_STORAGE_FORMAT = 526,
1753    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1754    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1755    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1756    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1757    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1758    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1759    #[doc = "Reset all camera settings to Factory Default"]
1760    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1761    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1762    MAV_CMD_SET_CAMERA_MODE = 530,
1763    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1764    MAV_CMD_SET_CAMERA_ZOOM = 531,
1765    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1766    MAV_CMD_SET_CAMERA_FOCUS = 532,
1767    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1768    MAV_CMD_SET_STORAGE_USAGE = 533,
1769    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1770    MAV_CMD_SET_CAMERA_SOURCE = 534,
1771    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1772    MAV_CMD_JUMP_TAG = 600,
1773    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1774    MAV_CMD_DO_JUMP_TAG = 601,
1775    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1776    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1777    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1778    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1779    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1780    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1781    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1782    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1783    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1784    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1785    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1786    #[doc = "Enable or disable on-board camera triggering system."]
1787    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1788    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1789    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1790    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1791    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1792    #[doc = "Stops ongoing tracking."]
1793    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1794    #[doc = "Starts video capture (recording)."]
1795    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1796    #[doc = "Stop the current video capture (recording)."]
1797    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1798    #[doc = "Start video streaming"]
1799    MAV_CMD_VIDEO_START_STREAMING = 2502,
1800    #[doc = "Stop the given video stream"]
1801    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1802    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1803    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1804    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1805    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1806    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1807    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1808    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1809    MAV_CMD_LOGGING_START = 2510,
1810    #[doc = "Request to stop streaming log data over MAVLink"]
1811    MAV_CMD_LOGGING_STOP = 2511,
1812    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1813    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1814    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1815    #[doc = "Create a panorama at the current position"]
1816    MAV_CMD_PANORAMA_CREATE = 2800,
1817    #[doc = "Request VTOL transition"]
1818    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1819    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1820    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1821    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1822    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1823    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1824    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1825    #[doc = "Delay mission state machine until gate has been reached."]
1826    MAV_CMD_CONDITION_GATE = 4501,
1827    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1828    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1829    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1830    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1831    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1832    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1833    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1834    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1835    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1836    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1837    #[doc = "Rally point. You can have multiple rally points defined."]
1838    MAV_CMD_NAV_RALLY_POINT = 5100,
1839    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1840    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1841    #[doc = "Change state of safety switch."]
1842    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1843    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1844    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1845    #[deprecated = "  (Deprecated since 2021-06)"]
1846    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1847    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1848    #[deprecated = "  (Deprecated since 2021-06)"]
1849    #[doc = "Control the payload deployment."]
1850    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1851    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1852    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1853    #[doc = "Command to operate winch."]
1854    MAV_CMD_DO_WINCH = 42600,
1855    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1856    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1857    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1858    MAV_CMD_WAYPOINT_USER_1 = 31000,
1859    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1860    MAV_CMD_WAYPOINT_USER_2 = 31001,
1861    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1862    MAV_CMD_WAYPOINT_USER_3 = 31002,
1863    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1864    MAV_CMD_WAYPOINT_USER_4 = 31003,
1865    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1866    MAV_CMD_WAYPOINT_USER_5 = 31004,
1867    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1868    MAV_CMD_SPATIAL_USER_1 = 31005,
1869    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1870    MAV_CMD_SPATIAL_USER_2 = 31006,
1871    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1872    MAV_CMD_SPATIAL_USER_3 = 31007,
1873    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1874    MAV_CMD_SPATIAL_USER_4 = 31008,
1875    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1876    MAV_CMD_SPATIAL_USER_5 = 31009,
1877    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1878    MAV_CMD_USER_1 = 31010,
1879    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1880    MAV_CMD_USER_2 = 31011,
1881    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1882    MAV_CMD_USER_3 = 31012,
1883    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1884    MAV_CMD_USER_4 = 31013,
1885    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1886    MAV_CMD_USER_5 = 31014,
1887    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1888    MAV_CMD_CAN_FORWARD = 32000,
1889    #[doc = "Fly a figure eight path as defined by the parameters.           Set parameters to NaN/INT32_MAX (as appropriate) to use system-default values.           The command is intended for fixed wing vehicles (and VTOL hybrids flying in fixed-wing mode), allowing POI tracking for gimbals that don't support infinite rotation.           This command only defines the flight path. Speed should be set independently (use e.g. MAV_CMD_DO_CHANGE_SPEED).           Yaw and other degrees of freedom are not specified, and will be flight-stack specific (on vehicles where they can be controlled independent of the heading)."]
1890    MAV_CMD_DO_FIGURE_EIGHT = 35,
1891    #[doc = "Request a target system to start an upgrade of one (or all) of its components.           For example, the command might be sent to a companion computer to cause it to upgrade a connected flight controller.           The system doing the upgrade will report progress using the normal command protocol sequence for a long running operation.           Command protocol information: <https://mavlink.io/en/services/command.html>."]
1892    MAV_CMD_DO_UPGRADE = 247,
1893    #[doc = "Allows setting an AT S command of an SiK radio."]
1894    MAV_CMD_SET_AT_S_PARAM = 550,
1895    #[doc = "Set system and component id.           This allows moving of a system and all its components to a new system id, or moving a particular component to a new system/component id.           Recipients must reject command addressed to broadcast system ID."]
1896    MAV_CMD_DO_SET_SYS_CMP_ID = 610,
1897    #[doc = "Sets the GNSS coordinates of the vehicle local origin (0,0,0) position.           Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed.           This enables transform between the local coordinate frame and the global (GNSS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor.           This command supersedes SET_GPS_GLOBAL_ORIGIN.           Should be sent in a COMMAND_INT (Expected frame is MAV_FRAME_GLOBAL, and this should be assumed when sent in COMMAND_LONG)."]
1898    MAV_CMD_DO_SET_GLOBAL_ORIGIN = 611,
1899    #[doc = "Used to manually set/unset emergency status for remote id.           This is for compliance with MOC ASTM docs, specifically F358 section 7.7: \"Emergency Status Indicator\".           The requirement can also be satisfied by automatic setting of the emergency status by flight stack, and that approach is preferred.           See <https://mavlink.io/en/services/opendroneid.html> for more information."]
1900    MAV_CMD_ODID_SET_EMERGENCY = 12900,
1901    #[doc = "Set an external estimate of wind direction and speed.           This might be used to provide an initial wind estimate to the estimator (EKF) in the case where the vehicle is wind dead-reckoning, extending the time when operating without GPS before before position drift builds to an unsafe level. For this use case the command might reasonably be sent every few minutes when operating at altitude, and the value is cleared if the estimator resets itself."]
1902    MAV_CMD_EXTERNAL_WIND_ESTIMATE = 43004,
1903    #[doc = "Request GCS control of a system (or of a specific component in a system).            A controlled system should only accept MAVLink commands and command-like messages that are sent by its controlling GCS, or from other components with the same system id.           Commands from other systems should be rejected with MAV_RESULT_FAILED (except for this command, which may be acknowledged with MAV_RESULT_ACCEPTED if control is granted).           Command-like messages should be ignored (or rejected if that is supported by their associated protocol).            GCS control of the whole system is managed via a single component that we will refer to here as the \"system manager component\".           This component streams the CONTROL_STATUS message and sets the GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER flag.           Other components in the system should monitor for the CONTROL_STATUS message with this flag, and set their controlling GCS to match its published system id.           A GCS that wants to control the system should also monitor for the same message and flag, and address the MAV_CMD_REQUEST_OPERATOR_CONTROL to its component id.           Note that integrators are required to ensure that there is only one system manager component in the system (i.e. one component emitting the message with GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER set).            The MAV_CMD_REQUEST_OPERATOR_CONTROL command is sent by a GCS to the system manager component to request or release control of a system, specifying whether subsequent takeover requests from another GCS are automatically granted, or require permission.            The system manager component should grant control to the GCS if the system does not require takeover permission (or is uncontrolled) and ACK the request with MAV_RESULT_ACCEPTED.           The system manager component should then stream CONTROL_STATUS indicating its controlling system: all other components with the same system id should monitor this message and set their own controlling GCS to match that of the system manager component.            If the system manager component cannot grant control (because takeover requires permission), the request should be rejected with MAV_RESULT_FAILED.           The system manager component should then send this same command to the current owning GCS in order to notify of the request.           The owning GCS would ACK with MAV_RESULT_ACCEPTED, and might choose to release control of the vehicle, or re-request control with the takeover bit set to allow permission.           In case it choses to re-request control with takeover bit set to allow permission, requestor GCS will only have 10 seconds to get control, otherwise owning GCS will re-request control with takeover bit set to disallow permission, and requestor GCS will need repeat the request if still interested in getting control.           Note that the pilots of both GCS should co-ordinate safe handover offline.            Note that in most systems the only controlled component will be the \"system manager component\", and that will be the autopilot.           However separate GCS control of a particular component is also permitted, if supported by the component.           In this case the GCS will address MAV_CMD_REQUEST_OPERATOR_CONTROL to the specific component it wants to control.           The component will then stream CONTROL_STATUS for its controlling GCS (it must not set GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER).           The component should fall back to the system GCS (if any) when it is not directly controlled, and may stop emitting CONTROL_STATUS.           The flow is otherwise the same as for requesting control over the whole system."]
1904    MAV_CMD_REQUEST_OPERATOR_CONTROL = 32100,
1905}
1906impl MavCmd {
1907    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1908}
1909impl Default for MavCmd {
1910    fn default() -> Self {
1911        Self::DEFAULT
1912    }
1913}
1914#[cfg_attr(feature = "ts", derive(TS))]
1915#[cfg_attr(feature = "ts", ts(export))]
1916#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1918#[cfg_attr(feature = "serde", serde(tag = "type"))]
1919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1920#[repr(u32)]
1921#[doc = "Possible actions an aircraft can take to avoid a collision."]
1922pub enum MavCollisionAction {
1923    #[doc = "Ignore any potential collisions"]
1924    MAV_COLLISION_ACTION_NONE = 0,
1925    #[doc = "Report potential collision"]
1926    MAV_COLLISION_ACTION_REPORT = 1,
1927    #[doc = "Ascend or Descend to avoid threat"]
1928    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1929    #[doc = "Move horizontally to avoid threat"]
1930    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1931    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1932    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1933    #[doc = "Aircraft to fly directly back to its launch point"]
1934    MAV_COLLISION_ACTION_RTL = 5,
1935    #[doc = "Aircraft to stop in place"]
1936    MAV_COLLISION_ACTION_HOVER = 6,
1937}
1938impl MavCollisionAction {
1939    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1940}
1941impl Default for MavCollisionAction {
1942    fn default() -> Self {
1943        Self::DEFAULT
1944    }
1945}
1946#[cfg_attr(feature = "ts", derive(TS))]
1947#[cfg_attr(feature = "ts", ts(export))]
1948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1950#[cfg_attr(feature = "serde", serde(tag = "type"))]
1951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1952#[repr(u32)]
1953#[doc = "Source of information about this collision."]
1954pub enum MavCollisionSrc {
1955    #[doc = "ID field references ADSB_VEHICLE packets"]
1956    MAV_COLLISION_SRC_ADSB = 0,
1957    #[doc = "ID field references MAVLink SRC ID"]
1958    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1959}
1960impl MavCollisionSrc {
1961    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1962}
1963impl Default for MavCollisionSrc {
1964    fn default() -> Self {
1965        Self::DEFAULT
1966    }
1967}
1968#[cfg_attr(feature = "ts", derive(TS))]
1969#[cfg_attr(feature = "ts", ts(export))]
1970#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1972#[cfg_attr(feature = "serde", serde(tag = "type"))]
1973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1974#[repr(u32)]
1975#[doc = "Aircraft-rated danger from this threat."]
1976pub enum MavCollisionThreatLevel {
1977    #[doc = "Not a threat"]
1978    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1979    #[doc = "Craft is mildly concerned about this threat"]
1980    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1981    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1982    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1983}
1984impl MavCollisionThreatLevel {
1985    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1986}
1987impl Default for MavCollisionThreatLevel {
1988    fn default() -> Self {
1989        Self::DEFAULT
1990    }
1991}
1992#[cfg_attr(feature = "ts", derive(TS))]
1993#[cfg_attr(feature = "ts", ts(export))]
1994#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1996#[cfg_attr(feature = "serde", serde(tag = "type"))]
1997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1998#[repr(u32)]
1999#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
2000pub enum MavComponent {
2001    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
2002    MAV_COMP_ID_ALL = 0,
2003    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
2004    MAV_COMP_ID_AUTOPILOT1 = 1,
2005    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2006    MAV_COMP_ID_USER1 = 25,
2007    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2008    MAV_COMP_ID_USER2 = 26,
2009    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2010    MAV_COMP_ID_USER3 = 27,
2011    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2012    MAV_COMP_ID_USER4 = 28,
2013    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2014    MAV_COMP_ID_USER5 = 29,
2015    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2016    MAV_COMP_ID_USER6 = 30,
2017    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2018    MAV_COMP_ID_USER7 = 31,
2019    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2020    MAV_COMP_ID_USER8 = 32,
2021    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2022    MAV_COMP_ID_USER9 = 33,
2023    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2024    MAV_COMP_ID_USER10 = 34,
2025    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2026    MAV_COMP_ID_USER11 = 35,
2027    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2028    MAV_COMP_ID_USER12 = 36,
2029    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2030    MAV_COMP_ID_USER13 = 37,
2031    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2032    MAV_COMP_ID_USER14 = 38,
2033    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2034    MAV_COMP_ID_USER15 = 39,
2035    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2036    MAV_COMP_ID_USER16 = 40,
2037    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2038    MAV_COMP_ID_USER17 = 41,
2039    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2040    MAV_COMP_ID_USER18 = 42,
2041    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2042    MAV_COMP_ID_USER19 = 43,
2043    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2044    MAV_COMP_ID_USER20 = 44,
2045    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2046    MAV_COMP_ID_USER21 = 45,
2047    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2048    MAV_COMP_ID_USER22 = 46,
2049    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2050    MAV_COMP_ID_USER23 = 47,
2051    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2052    MAV_COMP_ID_USER24 = 48,
2053    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2054    MAV_COMP_ID_USER25 = 49,
2055    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2056    MAV_COMP_ID_USER26 = 50,
2057    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2058    MAV_COMP_ID_USER27 = 51,
2059    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2060    MAV_COMP_ID_USER28 = 52,
2061    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2062    MAV_COMP_ID_USER29 = 53,
2063    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2064    MAV_COMP_ID_USER30 = 54,
2065    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2066    MAV_COMP_ID_USER31 = 55,
2067    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2068    MAV_COMP_ID_USER32 = 56,
2069    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2070    MAV_COMP_ID_USER33 = 57,
2071    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2072    MAV_COMP_ID_USER34 = 58,
2073    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2074    MAV_COMP_ID_USER35 = 59,
2075    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2076    MAV_COMP_ID_USER36 = 60,
2077    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2078    MAV_COMP_ID_USER37 = 61,
2079    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2080    MAV_COMP_ID_USER38 = 62,
2081    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2082    MAV_COMP_ID_USER39 = 63,
2083    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2084    MAV_COMP_ID_USER40 = 64,
2085    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2086    MAV_COMP_ID_USER41 = 65,
2087    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2088    MAV_COMP_ID_USER42 = 66,
2089    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2090    MAV_COMP_ID_USER43 = 67,
2091    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2092    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2093    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2094    MAV_COMP_ID_USER45 = 69,
2095    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2096    MAV_COMP_ID_USER46 = 70,
2097    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2098    MAV_COMP_ID_USER47 = 71,
2099    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2100    MAV_COMP_ID_USER48 = 72,
2101    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2102    MAV_COMP_ID_USER49 = 73,
2103    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2104    MAV_COMP_ID_USER50 = 74,
2105    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2106    MAV_COMP_ID_USER51 = 75,
2107    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2108    MAV_COMP_ID_USER52 = 76,
2109    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2110    MAV_COMP_ID_USER53 = 77,
2111    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2112    MAV_COMP_ID_USER54 = 78,
2113    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2114    MAV_COMP_ID_USER55 = 79,
2115    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2116    MAV_COMP_ID_USER56 = 80,
2117    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2118    MAV_COMP_ID_USER57 = 81,
2119    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2120    MAV_COMP_ID_USER58 = 82,
2121    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2122    MAV_COMP_ID_USER59 = 83,
2123    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2124    MAV_COMP_ID_USER60 = 84,
2125    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2126    MAV_COMP_ID_USER61 = 85,
2127    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2128    MAV_COMP_ID_USER62 = 86,
2129    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2130    MAV_COMP_ID_USER63 = 87,
2131    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2132    MAV_COMP_ID_USER64 = 88,
2133    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2134    MAV_COMP_ID_USER65 = 89,
2135    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2136    MAV_COMP_ID_USER66 = 90,
2137    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2138    MAV_COMP_ID_USER67 = 91,
2139    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2140    MAV_COMP_ID_USER68 = 92,
2141    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2142    MAV_COMP_ID_USER69 = 93,
2143    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2144    MAV_COMP_ID_USER70 = 94,
2145    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2146    MAV_COMP_ID_USER71 = 95,
2147    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2148    MAV_COMP_ID_USER72 = 96,
2149    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2150    MAV_COMP_ID_USER73 = 97,
2151    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2152    MAV_COMP_ID_USER74 = 98,
2153    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2154    MAV_COMP_ID_USER75 = 99,
2155    #[doc = "Camera #1."]
2156    MAV_COMP_ID_CAMERA = 100,
2157    #[doc = "Camera #2."]
2158    MAV_COMP_ID_CAMERA2 = 101,
2159    #[doc = "Camera #3."]
2160    MAV_COMP_ID_CAMERA3 = 102,
2161    #[doc = "Camera #4."]
2162    MAV_COMP_ID_CAMERA4 = 103,
2163    #[doc = "Camera #5."]
2164    MAV_COMP_ID_CAMERA5 = 104,
2165    #[doc = "Camera #6."]
2166    MAV_COMP_ID_CAMERA6 = 105,
2167    #[doc = "Servo #1."]
2168    MAV_COMP_ID_SERVO1 = 140,
2169    #[doc = "Servo #2."]
2170    MAV_COMP_ID_SERVO2 = 141,
2171    #[doc = "Servo #3."]
2172    MAV_COMP_ID_SERVO3 = 142,
2173    #[doc = "Servo #4."]
2174    MAV_COMP_ID_SERVO4 = 143,
2175    #[doc = "Servo #5."]
2176    MAV_COMP_ID_SERVO5 = 144,
2177    #[doc = "Servo #6."]
2178    MAV_COMP_ID_SERVO6 = 145,
2179    #[doc = "Servo #7."]
2180    MAV_COMP_ID_SERVO7 = 146,
2181    #[doc = "Servo #8."]
2182    MAV_COMP_ID_SERVO8 = 147,
2183    #[doc = "Servo #9."]
2184    MAV_COMP_ID_SERVO9 = 148,
2185    #[doc = "Servo #10."]
2186    MAV_COMP_ID_SERVO10 = 149,
2187    #[doc = "Servo #11."]
2188    MAV_COMP_ID_SERVO11 = 150,
2189    #[doc = "Servo #12."]
2190    MAV_COMP_ID_SERVO12 = 151,
2191    #[doc = "Servo #13."]
2192    MAV_COMP_ID_SERVO13 = 152,
2193    #[doc = "Servo #14."]
2194    MAV_COMP_ID_SERVO14 = 153,
2195    #[doc = "Gimbal #1."]
2196    MAV_COMP_ID_GIMBAL = 154,
2197    #[doc = "Logging component."]
2198    MAV_COMP_ID_LOG = 155,
2199    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2200    MAV_COMP_ID_ADSB = 156,
2201    #[doc = "On Screen Display (OSD) devices for video links."]
2202    MAV_COMP_ID_OSD = 157,
2203    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2204    MAV_COMP_ID_PERIPHERAL = 158,
2205    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2206    #[doc = "Gimbal ID for QX1."]
2207    MAV_COMP_ID_QX1_GIMBAL = 159,
2208    #[doc = "FLARM collision alert component."]
2209    MAV_COMP_ID_FLARM = 160,
2210    #[doc = "Parachute component."]
2211    MAV_COMP_ID_PARACHUTE = 161,
2212    #[doc = "Winch component."]
2213    MAV_COMP_ID_WINCH = 169,
2214    #[doc = "Gimbal #2."]
2215    MAV_COMP_ID_GIMBAL2 = 171,
2216    #[doc = "Gimbal #3."]
2217    MAV_COMP_ID_GIMBAL3 = 172,
2218    #[doc = "Gimbal #4"]
2219    MAV_COMP_ID_GIMBAL4 = 173,
2220    #[doc = "Gimbal #5."]
2221    MAV_COMP_ID_GIMBAL5 = 174,
2222    #[doc = "Gimbal #6."]
2223    MAV_COMP_ID_GIMBAL6 = 175,
2224    #[doc = "Battery #1."]
2225    MAV_COMP_ID_BATTERY = 180,
2226    #[doc = "Battery #2."]
2227    MAV_COMP_ID_BATTERY2 = 181,
2228    #[doc = "CAN over MAVLink client."]
2229    MAV_COMP_ID_MAVCAN = 189,
2230    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2231    MAV_COMP_ID_MISSIONPLANNER = 190,
2232    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2233    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2234    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2235    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2236    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2237    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2238    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2239    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2240    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2241    MAV_COMP_ID_PATHPLANNER = 195,
2242    #[doc = "Component that plans a collision free path between two points."]
2243    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2244    #[doc = "Component that provides position estimates using VIO techniques."]
2245    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2246    #[doc = "Component that manages pairing of vehicle and GCS."]
2247    MAV_COMP_ID_PAIRING_MANAGER = 198,
2248    #[doc = "Inertial Measurement Unit (IMU) #1."]
2249    MAV_COMP_ID_IMU = 200,
2250    #[doc = "Inertial Measurement Unit (IMU) #2."]
2251    MAV_COMP_ID_IMU_2 = 201,
2252    #[doc = "Inertial Measurement Unit (IMU) #3."]
2253    MAV_COMP_ID_IMU_3 = 202,
2254    #[doc = "GPS #1."]
2255    MAV_COMP_ID_GPS = 220,
2256    #[doc = "GPS #2."]
2257    MAV_COMP_ID_GPS2 = 221,
2258    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2259    MAV_COMP_ID_ODID_TXRX_1 = 236,
2260    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2261    MAV_COMP_ID_ODID_TXRX_2 = 237,
2262    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2263    MAV_COMP_ID_ODID_TXRX_3 = 238,
2264    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2265    MAV_COMP_ID_UDP_BRIDGE = 240,
2266    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2267    MAV_COMP_ID_UART_BRIDGE = 241,
2268    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2269    MAV_COMP_ID_TUNNEL_NODE = 242,
2270    #[doc = "Illuminator"]
2271    MAV_COMP_ID_ILLUMINATOR = 243,
2272    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2273    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2274    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2275}
2276impl MavComponent {
2277    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2278}
2279impl Default for MavComponent {
2280    fn default() -> Self {
2281        Self::DEFAULT
2282    }
2283}
2284#[cfg_attr(feature = "ts", derive(TS))]
2285#[cfg_attr(feature = "ts", ts(export))]
2286#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2288#[cfg_attr(feature = "serde", serde(tag = "type"))]
2289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2290#[repr(u32)]
2291#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2292#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2293pub enum MavDataStream {
2294    #[doc = "Enable all data streams"]
2295    MAV_DATA_STREAM_ALL = 0,
2296    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2297    MAV_DATA_STREAM_RAW_SENSORS = 1,
2298    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2299    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2300    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2301    MAV_DATA_STREAM_RC_CHANNELS = 3,
2302    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2303    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2304    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2305    MAV_DATA_STREAM_POSITION = 6,
2306    #[doc = "Dependent on the autopilot"]
2307    MAV_DATA_STREAM_EXTRA1 = 10,
2308    #[doc = "Dependent on the autopilot"]
2309    MAV_DATA_STREAM_EXTRA2 = 11,
2310    #[doc = "Dependent on the autopilot"]
2311    MAV_DATA_STREAM_EXTRA3 = 12,
2312}
2313impl MavDataStream {
2314    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2315}
2316impl Default for MavDataStream {
2317    fn default() -> Self {
2318        Self::DEFAULT
2319    }
2320}
2321#[cfg_attr(feature = "ts", derive(TS))]
2322#[cfg_attr(feature = "ts", ts(export))]
2323#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2325#[cfg_attr(feature = "serde", serde(tag = "type"))]
2326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2327#[repr(u32)]
2328#[doc = "Enumeration of distance sensor types"]
2329pub enum MavDistanceSensor {
2330    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2331    MAV_DISTANCE_SENSOR_LASER = 0,
2332    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2333    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2334    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2335    MAV_DISTANCE_SENSOR_INFRARED = 2,
2336    #[doc = "Radar type, e.g. uLanding units"]
2337    MAV_DISTANCE_SENSOR_RADAR = 3,
2338    #[doc = "Broken or unknown type, e.g. analog units"]
2339    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2340}
2341impl MavDistanceSensor {
2342    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2343}
2344impl Default for MavDistanceSensor {
2345    fn default() -> Self {
2346        Self::DEFAULT
2347    }
2348}
2349#[cfg_attr(feature = "ts", derive(TS))]
2350#[cfg_attr(feature = "ts", ts(export))]
2351#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2353#[cfg_attr(feature = "serde", serde(tag = "type"))]
2354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2355#[repr(u32)]
2356#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2357pub enum MavDoRepositionFlags {
2358    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2359    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2360}
2361impl MavDoRepositionFlags {
2362    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2363}
2364impl Default for MavDoRepositionFlags {
2365    fn default() -> Self {
2366        Self::DEFAULT
2367    }
2368}
2369#[cfg_attr(feature = "ts", derive(TS))]
2370#[cfg_attr(feature = "ts", ts(export))]
2371#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2373#[cfg_attr(feature = "serde", serde(tag = "type"))]
2374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2375#[repr(u32)]
2376#[doc = "Enumeration of estimator types"]
2377pub enum MavEstimatorType {
2378    #[doc = "Unknown type of the estimator."]
2379    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2380    #[doc = "This is a naive estimator without any real covariance feedback."]
2381    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2382    #[doc = "Computer vision based estimate. Might be up to scale."]
2383    MAV_ESTIMATOR_TYPE_VISION = 2,
2384    #[doc = "Visual-inertial estimate."]
2385    MAV_ESTIMATOR_TYPE_VIO = 3,
2386    #[doc = "Plain GPS estimate."]
2387    MAV_ESTIMATOR_TYPE_GPS = 4,
2388    #[doc = "Estimator integrating GPS and inertial sensing."]
2389    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2390    #[doc = "Estimate from external motion capturing system."]
2391    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2392    #[doc = "Estimator based on lidar sensor input."]
2393    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2394    #[doc = "Estimator on autopilot."]
2395    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2396}
2397impl MavEstimatorType {
2398    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2399}
2400impl Default for MavEstimatorType {
2401    fn default() -> Self {
2402        Self::DEFAULT
2403    }
2404}
2405#[cfg_attr(feature = "ts", derive(TS))]
2406#[cfg_attr(feature = "ts", ts(export))]
2407#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2409#[cfg_attr(feature = "serde", serde(tag = "type"))]
2410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2411#[repr(u32)]
2412#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2413pub enum MavEventCurrentSequenceFlags {
2414    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2415    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2416}
2417impl MavEventCurrentSequenceFlags {
2418    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2419}
2420impl Default for MavEventCurrentSequenceFlags {
2421    fn default() -> Self {
2422        Self::DEFAULT
2423    }
2424}
2425#[cfg_attr(feature = "ts", derive(TS))]
2426#[cfg_attr(feature = "ts", ts(export))]
2427#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2429#[cfg_attr(feature = "serde", serde(tag = "type"))]
2430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2431#[repr(u32)]
2432#[doc = "Reason for an event error response."]
2433pub enum MavEventErrorReason {
2434    #[doc = "The requested event is not available (anymore)."]
2435    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2436}
2437impl MavEventErrorReason {
2438    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2439}
2440impl Default for MavEventErrorReason {
2441    fn default() -> Self {
2442        Self::DEFAULT
2443    }
2444}
2445#[cfg_attr(feature = "ts", derive(TS))]
2446#[cfg_attr(feature = "ts", ts(export))]
2447#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2449#[cfg_attr(feature = "serde", serde(tag = "type"))]
2450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2451#[repr(u32)]
2452#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2453pub enum MavFrame {
2454    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2455    MAV_FRAME_GLOBAL = 0,
2456    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2457    MAV_FRAME_LOCAL_NED = 1,
2458    #[doc = "NOT a coordinate frame, indicates a mission command."]
2459    MAV_FRAME_MISSION = 2,
2460    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2461    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2462    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2463    MAV_FRAME_LOCAL_ENU = 4,
2464    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2465    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2466    MAV_FRAME_GLOBAL_INT = 5,
2467    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2468    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2469    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2470    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2471    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2472    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2473    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2474    MAV_FRAME_BODY_NED = 8,
2475    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2476    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2477    MAV_FRAME_BODY_OFFSET_NED = 9,
2478    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2479    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2480    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2481    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2482    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2483    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2484    MAV_FRAME_BODY_FRD = 12,
2485    #[deprecated = "  (Deprecated since 2019-04)"]
2486    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2487    MAV_FRAME_RESERVED_13 = 13,
2488    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2489    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2490    MAV_FRAME_RESERVED_14 = 14,
2491    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2492    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2493    MAV_FRAME_RESERVED_15 = 15,
2494    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2495    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2496    MAV_FRAME_RESERVED_16 = 16,
2497    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2498    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2499    MAV_FRAME_RESERVED_17 = 17,
2500    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2501    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2502    MAV_FRAME_RESERVED_18 = 18,
2503    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2504    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2505    MAV_FRAME_RESERVED_19 = 19,
2506    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2507    MAV_FRAME_LOCAL_FRD = 20,
2508    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2509    MAV_FRAME_LOCAL_FLU = 21,
2510}
2511impl MavFrame {
2512    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2513}
2514impl Default for MavFrame {
2515    fn default() -> Self {
2516        Self::DEFAULT
2517    }
2518}
2519#[cfg_attr(feature = "ts", derive(TS))]
2520#[cfg_attr(feature = "ts", ts(export))]
2521#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2523#[cfg_attr(feature = "serde", serde(tag = "type"))]
2524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2525#[repr(u32)]
2526#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2527pub enum MavFtpErr {
2528    #[doc = "None: No error"]
2529    MAV_FTP_ERR_NONE = 0,
2530    #[doc = "Fail: Unknown failure"]
2531    MAV_FTP_ERR_FAIL = 1,
2532    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2533    MAV_FTP_ERR_FAILERRNO = 2,
2534    #[doc = "InvalidDataSize: Payload size is invalid"]
2535    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2536    #[doc = "InvalidSession: Session is not currently open"]
2537    MAV_FTP_ERR_INVALIDSESSION = 4,
2538    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2539    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2540    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2541    MAV_FTP_ERR_EOF = 6,
2542    #[doc = "UnknownCommand: Unknown command / opcode"]
2543    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2544    #[doc = "FileExists: File/directory already exists"]
2545    MAV_FTP_ERR_FILEEXISTS = 8,
2546    #[doc = "FileProtected: File/directory is write protected"]
2547    MAV_FTP_ERR_FILEPROTECTED = 9,
2548    #[doc = "FileNotFound: File/directory not found"]
2549    MAV_FTP_ERR_FILENOTFOUND = 10,
2550}
2551impl MavFtpErr {
2552    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2553}
2554impl Default for MavFtpErr {
2555    fn default() -> Self {
2556        Self::DEFAULT
2557    }
2558}
2559#[cfg_attr(feature = "ts", derive(TS))]
2560#[cfg_attr(feature = "ts", ts(export))]
2561#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2563#[cfg_attr(feature = "serde", serde(tag = "type"))]
2564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2565#[repr(u32)]
2566#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2567pub enum MavFtpOpcode {
2568    #[doc = "None. Ignored, always ACKed"]
2569    MAV_FTP_OPCODE_NONE = 0,
2570    #[doc = "TerminateSession: Terminates open Read session"]
2571    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2572    #[doc = "ResetSessions: Terminates all open read sessions"]
2573    MAV_FTP_OPCODE_RESETSESSION = 2,
2574    #[doc = "ListDirectory. List files and directories in path from offset"]
2575    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2576    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2577    MAV_FTP_OPCODE_OPENFILERO = 4,
2578    #[doc = "ReadFile: Reads size bytes from offset in session"]
2579    MAV_FTP_OPCODE_READFILE = 5,
2580    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2581    MAV_FTP_OPCODE_CREATEFILE = 6,
2582    #[doc = "WriteFile: Writes size bytes to offset in session"]
2583    MAV_FTP_OPCODE_WRITEFILE = 7,
2584    #[doc = "RemoveFile: Remove file at path"]
2585    MAV_FTP_OPCODE_REMOVEFILE = 8,
2586    #[doc = "CreateDirectory: Creates directory at path"]
2587    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2588    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2589    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2590    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2591    MAV_FTP_OPCODE_OPENFILEWO = 11,
2592    #[doc = "TruncateFile: Truncate file at path to offset length"]
2593    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2594    #[doc = "Rename: Rename path1 to path2"]
2595    MAV_FTP_OPCODE_RENAME = 13,
2596    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2597    MAV_FTP_OPCODE_CALCFILECRC = 14,
2598    #[doc = "BurstReadFile: Burst download session file"]
2599    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2600    #[doc = "ACK: ACK response"]
2601    MAV_FTP_OPCODE_ACK = 128,
2602    #[doc = "NAK: NAK response"]
2603    MAV_FTP_OPCODE_NAK = 129,
2604}
2605impl MavFtpOpcode {
2606    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2607}
2608impl Default for MavFtpOpcode {
2609    fn default() -> Self {
2610        Self::DEFAULT
2611    }
2612}
2613#[cfg_attr(feature = "ts", derive(TS))]
2614#[cfg_attr(feature = "ts", ts(export))]
2615#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2617#[cfg_attr(feature = "serde", serde(tag = "type"))]
2618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2619#[repr(u32)]
2620#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2621pub enum MavFuelType {
2622    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2623    MAV_FUEL_TYPE_UNKNOWN = 0,
2624    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2625    MAV_FUEL_TYPE_LIQUID = 1,
2626    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2627    MAV_FUEL_TYPE_GAS = 2,
2628}
2629impl MavFuelType {
2630    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2631}
2632impl Default for MavFuelType {
2633    fn default() -> Self {
2634        Self::DEFAULT
2635    }
2636}
2637bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2638impl MavGeneratorStatusFlag {
2639    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2640}
2641impl Default for MavGeneratorStatusFlag {
2642    fn default() -> Self {
2643        Self::DEFAULT
2644    }
2645}
2646#[cfg_attr(feature = "ts", derive(TS))]
2647#[cfg_attr(feature = "ts", ts(export))]
2648#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2650#[cfg_attr(feature = "serde", serde(tag = "type"))]
2651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2652#[repr(u32)]
2653#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2654pub enum MavGoto {
2655    #[doc = "Hold at the current position."]
2656    MAV_GOTO_DO_HOLD = 0,
2657    #[doc = "Continue with the next item in mission execution."]
2658    MAV_GOTO_DO_CONTINUE = 1,
2659    #[doc = "Hold at the current position of the system"]
2660    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2661    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2662    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2663}
2664impl MavGoto {
2665    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2666}
2667impl Default for MavGoto {
2668    fn default() -> Self {
2669        Self::DEFAULT
2670    }
2671}
2672#[cfg_attr(feature = "ts", derive(TS))]
2673#[cfg_attr(feature = "ts", ts(export))]
2674#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2676#[cfg_attr(feature = "serde", serde(tag = "type"))]
2677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2678#[repr(u32)]
2679#[doc = "Enumeration of landed detector states"]
2680pub enum MavLandedState {
2681    #[doc = "MAV landed state is unknown"]
2682    MAV_LANDED_STATE_UNDEFINED = 0,
2683    #[doc = "MAV is landed (on ground)"]
2684    MAV_LANDED_STATE_ON_GROUND = 1,
2685    #[doc = "MAV is in air"]
2686    MAV_LANDED_STATE_IN_AIR = 2,
2687    #[doc = "MAV currently taking off"]
2688    MAV_LANDED_STATE_TAKEOFF = 3,
2689    #[doc = "MAV currently landing"]
2690    MAV_LANDED_STATE_LANDING = 4,
2691}
2692impl MavLandedState {
2693    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2694}
2695impl Default for MavLandedState {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700#[cfg_attr(feature = "ts", derive(TS))]
2701#[cfg_attr(feature = "ts", ts(export))]
2702#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2704#[cfg_attr(feature = "serde", serde(tag = "type"))]
2705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2706#[repr(u32)]
2707#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2708pub enum MavMissionResult {
2709    #[doc = "mission accepted OK"]
2710    MAV_MISSION_ACCEPTED = 0,
2711    #[doc = "Generic error / not accepting mission commands at all right now."]
2712    MAV_MISSION_ERROR = 1,
2713    #[doc = "Coordinate frame is not supported."]
2714    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2715    #[doc = "Command is not supported."]
2716    MAV_MISSION_UNSUPPORTED = 3,
2717    #[doc = "Mission items exceed storage space."]
2718    MAV_MISSION_NO_SPACE = 4,
2719    #[doc = "One of the parameters has an invalid value."]
2720    MAV_MISSION_INVALID = 5,
2721    #[doc = "param1 has an invalid value."]
2722    MAV_MISSION_INVALID_PARAM1 = 6,
2723    #[doc = "param2 has an invalid value."]
2724    MAV_MISSION_INVALID_PARAM2 = 7,
2725    #[doc = "param3 has an invalid value."]
2726    MAV_MISSION_INVALID_PARAM3 = 8,
2727    #[doc = "param4 has an invalid value."]
2728    MAV_MISSION_INVALID_PARAM4 = 9,
2729    #[doc = "x / param5 has an invalid value."]
2730    MAV_MISSION_INVALID_PARAM5_X = 10,
2731    #[doc = "y / param6 has an invalid value."]
2732    MAV_MISSION_INVALID_PARAM6_Y = 11,
2733    #[doc = "z / param7 has an invalid value."]
2734    MAV_MISSION_INVALID_PARAM7 = 12,
2735    #[doc = "Mission item received out of sequence"]
2736    MAV_MISSION_INVALID_SEQUENCE = 13,
2737    #[doc = "Not accepting any mission commands from this communication partner."]
2738    MAV_MISSION_DENIED = 14,
2739    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2740    MAV_MISSION_OPERATION_CANCELLED = 15,
2741}
2742impl MavMissionResult {
2743    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2744}
2745impl Default for MavMissionResult {
2746    fn default() -> Self {
2747        Self::DEFAULT
2748    }
2749}
2750#[cfg_attr(feature = "ts", derive(TS))]
2751#[cfg_attr(feature = "ts", ts(export))]
2752#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2754#[cfg_attr(feature = "serde", serde(tag = "type"))]
2755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2756#[repr(u32)]
2757#[doc = "Type of mission items being requested/sent in mission protocol."]
2758pub enum MavMissionType {
2759    #[doc = "Items are mission commands for main mission."]
2760    MAV_MISSION_TYPE_MISSION = 0,
2761    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2762    MAV_MISSION_TYPE_FENCE = 1,
2763    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2764    MAV_MISSION_TYPE_RALLY = 2,
2765    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2766    MAV_MISSION_TYPE_ALL = 255,
2767}
2768impl MavMissionType {
2769    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2770}
2771impl Default for MavMissionType {
2772    fn default() -> Self {
2773        Self::DEFAULT
2774    }
2775}
2776#[cfg_attr(feature = "ts", derive(TS))]
2777#[cfg_attr(feature = "ts", ts(export))]
2778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2780#[cfg_attr(feature = "serde", serde(tag = "type"))]
2781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2782#[repr(u32)]
2783#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2784pub enum MavMode {
2785    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2786    MAV_MODE_PREFLIGHT = 0,
2787    #[doc = "System is allowed to be active, under assisted RC control."]
2788    MAV_MODE_STABILIZE_DISARMED = 80,
2789    #[doc = "System is allowed to be active, under assisted RC control."]
2790    MAV_MODE_STABILIZE_ARMED = 208,
2791    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2792    MAV_MODE_MANUAL_DISARMED = 64,
2793    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2794    MAV_MODE_MANUAL_ARMED = 192,
2795    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2796    MAV_MODE_GUIDED_DISARMED = 88,
2797    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2798    MAV_MODE_GUIDED_ARMED = 216,
2799    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2800    MAV_MODE_AUTO_DISARMED = 92,
2801    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2802    MAV_MODE_AUTO_ARMED = 220,
2803    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2804    MAV_MODE_TEST_DISARMED = 66,
2805    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2806    MAV_MODE_TEST_ARMED = 194,
2807}
2808impl MavMode {
2809    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2810}
2811impl Default for MavMode {
2812    fn default() -> Self {
2813        Self::DEFAULT
2814    }
2815}
2816bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2817impl MavModeFlag {
2818    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2819}
2820impl Default for MavModeFlag {
2821    fn default() -> Self {
2822        Self::DEFAULT
2823    }
2824}
2825#[cfg_attr(feature = "ts", derive(TS))]
2826#[cfg_attr(feature = "ts", ts(export))]
2827#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2829#[cfg_attr(feature = "serde", serde(tag = "type"))]
2830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2831#[repr(u32)]
2832#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2833pub enum MavModeFlagDecodePosition {
2834    #[doc = "First bit:  10000000"]
2835    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2836    #[doc = "Second bit: 01000000"]
2837    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2838    #[doc = "Third bit:  00100000"]
2839    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2840    #[doc = "Fourth bit: 00010000"]
2841    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2842    #[doc = "Fifth bit:  00001000"]
2843    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2844    #[doc = "Sixth bit:   00000100"]
2845    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2846    #[doc = "Seventh bit: 00000010"]
2847    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2848    #[doc = "Eighth bit: 00000001"]
2849    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2850}
2851impl MavModeFlagDecodePosition {
2852    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2853}
2854impl Default for MavModeFlagDecodePosition {
2855    fn default() -> Self {
2856        Self::DEFAULT
2857    }
2858}
2859bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2860impl MavModeProperty {
2861    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2862}
2863impl Default for MavModeProperty {
2864    fn default() -> Self {
2865        Self::DEFAULT
2866    }
2867}
2868#[cfg_attr(feature = "ts", derive(TS))]
2869#[cfg_attr(feature = "ts", ts(export))]
2870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2872#[cfg_attr(feature = "serde", serde(tag = "type"))]
2873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2874#[repr(u32)]
2875#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2876#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2877pub enum MavMountMode {
2878    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2879    MAV_MOUNT_MODE_RETRACT = 0,
2880    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2881    MAV_MOUNT_MODE_NEUTRAL = 1,
2882    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2883    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2884    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2885    MAV_MOUNT_MODE_RC_TARGETING = 3,
2886    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2887    MAV_MOUNT_MODE_GPS_POINT = 4,
2888    #[doc = "Gimbal tracks system with specified system ID"]
2889    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2890    #[doc = "Gimbal tracks home position"]
2891    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2892}
2893impl MavMountMode {
2894    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2895}
2896impl Default for MavMountMode {
2897    fn default() -> Self {
2898        Self::DEFAULT
2899    }
2900}
2901#[cfg_attr(feature = "ts", derive(TS))]
2902#[cfg_attr(feature = "ts", ts(export))]
2903#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2905#[cfg_attr(feature = "serde", serde(tag = "type"))]
2906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2907#[repr(u32)]
2908pub enum MavOdidArmStatus {
2909    #[doc = "Passing arming checks."]
2910    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2911    #[doc = "Generic arming failure, see error string for details."]
2912    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2913}
2914impl MavOdidArmStatus {
2915    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2916}
2917impl Default for MavOdidArmStatus {
2918    fn default() -> Self {
2919        Self::DEFAULT
2920    }
2921}
2922#[cfg_attr(feature = "ts", derive(TS))]
2923#[cfg_attr(feature = "ts", ts(export))]
2924#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2926#[cfg_attr(feature = "serde", serde(tag = "type"))]
2927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2928#[repr(u32)]
2929pub enum MavOdidAuthType {
2930    #[doc = "No authentication type is specified."]
2931    MAV_ODID_AUTH_TYPE_NONE = 0,
2932    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2933    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2934    #[doc = "Signature for the Operator ID."]
2935    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2936    #[doc = "Signature for the entire message set."]
2937    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2938    #[doc = "Authentication is provided by Network Remote ID."]
2939    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2940    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2941    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2942}
2943impl MavOdidAuthType {
2944    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2945}
2946impl Default for MavOdidAuthType {
2947    fn default() -> Self {
2948        Self::DEFAULT
2949    }
2950}
2951#[cfg_attr(feature = "ts", derive(TS))]
2952#[cfg_attr(feature = "ts", ts(export))]
2953#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2955#[cfg_attr(feature = "serde", serde(tag = "type"))]
2956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2957#[repr(u32)]
2958pub enum MavOdidCategoryEu {
2959    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2960    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2961    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2962    MAV_ODID_CATEGORY_EU_OPEN = 1,
2963    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2964    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2965    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2966    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2967}
2968impl MavOdidCategoryEu {
2969    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2970}
2971impl Default for MavOdidCategoryEu {
2972    fn default() -> Self {
2973        Self::DEFAULT
2974    }
2975}
2976#[cfg_attr(feature = "ts", derive(TS))]
2977#[cfg_attr(feature = "ts", ts(export))]
2978#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2980#[cfg_attr(feature = "serde", serde(tag = "type"))]
2981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2982#[repr(u32)]
2983pub enum MavOdidClassEu {
2984    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2985    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2986    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2987    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2988    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2989    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2990    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2991    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2992    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2993    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2994    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2995    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2996    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2997    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2998    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2999    MAV_ODID_CLASS_EU_CLASS_6 = 7,
3000}
3001impl MavOdidClassEu {
3002    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
3003}
3004impl Default for MavOdidClassEu {
3005    fn default() -> Self {
3006        Self::DEFAULT
3007    }
3008}
3009#[cfg_attr(feature = "ts", derive(TS))]
3010#[cfg_attr(feature = "ts", ts(export))]
3011#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3013#[cfg_attr(feature = "serde", serde(tag = "type"))]
3014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3015#[repr(u32)]
3016pub enum MavOdidClassificationType {
3017    #[doc = "The classification type for the UA is undeclared."]
3018    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
3019    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
3020    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
3021}
3022impl MavOdidClassificationType {
3023    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
3024}
3025impl Default for MavOdidClassificationType {
3026    fn default() -> Self {
3027        Self::DEFAULT
3028    }
3029}
3030#[cfg_attr(feature = "ts", derive(TS))]
3031#[cfg_attr(feature = "ts", ts(export))]
3032#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3034#[cfg_attr(feature = "serde", serde(tag = "type"))]
3035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3036#[repr(u32)]
3037pub enum MavOdidDescType {
3038    #[doc = "Optional free-form text description of the purpose of the flight."]
3039    MAV_ODID_DESC_TYPE_TEXT = 0,
3040    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
3041    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
3042    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
3043    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
3044}
3045impl MavOdidDescType {
3046    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
3047}
3048impl Default for MavOdidDescType {
3049    fn default() -> Self {
3050        Self::DEFAULT
3051    }
3052}
3053#[cfg_attr(feature = "ts", derive(TS))]
3054#[cfg_attr(feature = "ts", ts(export))]
3055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3057#[cfg_attr(feature = "serde", serde(tag = "type"))]
3058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3059#[repr(u32)]
3060pub enum MavOdidHeightRef {
3061    #[doc = "The height field is relative to the take-off location."]
3062    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3063    #[doc = "The height field is relative to ground."]
3064    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3065}
3066impl MavOdidHeightRef {
3067    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3068}
3069impl Default for MavOdidHeightRef {
3070    fn default() -> Self {
3071        Self::DEFAULT
3072    }
3073}
3074#[cfg_attr(feature = "ts", derive(TS))]
3075#[cfg_attr(feature = "ts", ts(export))]
3076#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3078#[cfg_attr(feature = "serde", serde(tag = "type"))]
3079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3080#[repr(u32)]
3081pub enum MavOdidHorAcc {
3082    #[doc = "The horizontal accuracy is unknown."]
3083    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3084    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3085    MAV_ODID_HOR_ACC_10NM = 1,
3086    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3087    MAV_ODID_HOR_ACC_4NM = 2,
3088    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3089    MAV_ODID_HOR_ACC_2NM = 3,
3090    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3091    MAV_ODID_HOR_ACC_1NM = 4,
3092    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3093    MAV_ODID_HOR_ACC_0_5NM = 5,
3094    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3095    MAV_ODID_HOR_ACC_0_3NM = 6,
3096    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3097    MAV_ODID_HOR_ACC_0_1NM = 7,
3098    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3099    MAV_ODID_HOR_ACC_0_05NM = 8,
3100    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3101    MAV_ODID_HOR_ACC_30_METER = 9,
3102    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3103    MAV_ODID_HOR_ACC_10_METER = 10,
3104    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3105    MAV_ODID_HOR_ACC_3_METER = 11,
3106    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3107    MAV_ODID_HOR_ACC_1_METER = 12,
3108}
3109impl MavOdidHorAcc {
3110    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3111}
3112impl Default for MavOdidHorAcc {
3113    fn default() -> Self {
3114        Self::DEFAULT
3115    }
3116}
3117#[cfg_attr(feature = "ts", derive(TS))]
3118#[cfg_attr(feature = "ts", ts(export))]
3119#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3121#[cfg_attr(feature = "serde", serde(tag = "type"))]
3122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3123#[repr(u32)]
3124pub enum MavOdidIdType {
3125    #[doc = "No type defined."]
3126    MAV_ODID_ID_TYPE_NONE = 0,
3127    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3128    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3129    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3130    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3131    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3132    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3133    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3134    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3135}
3136impl MavOdidIdType {
3137    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3138}
3139impl Default for MavOdidIdType {
3140    fn default() -> Self {
3141        Self::DEFAULT
3142    }
3143}
3144#[cfg_attr(feature = "ts", derive(TS))]
3145#[cfg_attr(feature = "ts", ts(export))]
3146#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3148#[cfg_attr(feature = "serde", serde(tag = "type"))]
3149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3150#[repr(u32)]
3151pub enum MavOdidOperatorIdType {
3152    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3153    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3154}
3155impl MavOdidOperatorIdType {
3156    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3157}
3158impl Default for MavOdidOperatorIdType {
3159    fn default() -> Self {
3160        Self::DEFAULT
3161    }
3162}
3163#[cfg_attr(feature = "ts", derive(TS))]
3164#[cfg_attr(feature = "ts", ts(export))]
3165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3167#[cfg_attr(feature = "serde", serde(tag = "type"))]
3168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3169#[repr(u32)]
3170pub enum MavOdidOperatorLocationType {
3171    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3172    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3173    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3174    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3175    #[doc = "The location/altitude of the operator are fixed values."]
3176    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3177}
3178impl MavOdidOperatorLocationType {
3179    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3180}
3181impl Default for MavOdidOperatorLocationType {
3182    fn default() -> Self {
3183        Self::DEFAULT
3184    }
3185}
3186#[cfg_attr(feature = "ts", derive(TS))]
3187#[cfg_attr(feature = "ts", ts(export))]
3188#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3190#[cfg_attr(feature = "serde", serde(tag = "type"))]
3191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3192#[repr(u32)]
3193pub enum MavOdidSpeedAcc {
3194    #[doc = "The speed accuracy is unknown."]
3195    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3196    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3197    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3198    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3199    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3200    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3201    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3202    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3203    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3204}
3205impl MavOdidSpeedAcc {
3206    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3207}
3208impl Default for MavOdidSpeedAcc {
3209    fn default() -> Self {
3210        Self::DEFAULT
3211    }
3212}
3213#[cfg_attr(feature = "ts", derive(TS))]
3214#[cfg_attr(feature = "ts", ts(export))]
3215#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3217#[cfg_attr(feature = "serde", serde(tag = "type"))]
3218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3219#[repr(u32)]
3220pub enum MavOdidStatus {
3221    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3222    MAV_ODID_STATUS_UNDECLARED = 0,
3223    #[doc = "The UA is on the ground."]
3224    MAV_ODID_STATUS_GROUND = 1,
3225    #[doc = "The UA is in the air."]
3226    MAV_ODID_STATUS_AIRBORNE = 2,
3227    #[doc = "The UA is having an emergency."]
3228    MAV_ODID_STATUS_EMERGENCY = 3,
3229    #[doc = "The remote ID system is failing or unreliable in some way."]
3230    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3231}
3232impl MavOdidStatus {
3233    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3234}
3235impl Default for MavOdidStatus {
3236    fn default() -> Self {
3237        Self::DEFAULT
3238    }
3239}
3240#[cfg_attr(feature = "ts", derive(TS))]
3241#[cfg_attr(feature = "ts", ts(export))]
3242#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3244#[cfg_attr(feature = "serde", serde(tag = "type"))]
3245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3246#[repr(u32)]
3247pub enum MavOdidTimeAcc {
3248    #[doc = "The timestamp accuracy is unknown."]
3249    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3250    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3251    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3252    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3253    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3254    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3255    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3256    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3257    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3258    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3259    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3260    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3261    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3262    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3263    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3264    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3265    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3266    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3267    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3268    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3269    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3270    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3271    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3272    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3273    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3274    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3275    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3276    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3277    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3278    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3279    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3280}
3281impl MavOdidTimeAcc {
3282    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3283}
3284impl Default for MavOdidTimeAcc {
3285    fn default() -> Self {
3286        Self::DEFAULT
3287    }
3288}
3289#[cfg_attr(feature = "ts", derive(TS))]
3290#[cfg_attr(feature = "ts", ts(export))]
3291#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3293#[cfg_attr(feature = "serde", serde(tag = "type"))]
3294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3295#[repr(u32)]
3296pub enum MavOdidUaType {
3297    #[doc = "No UA (Unmanned Aircraft) type defined."]
3298    MAV_ODID_UA_TYPE_NONE = 0,
3299    #[doc = "Aeroplane/Airplane. Fixed wing."]
3300    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3301    #[doc = "Helicopter or multirotor."]
3302    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3303    #[doc = "Gyroplane."]
3304    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3305    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3306    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3307    #[doc = "Ornithopter."]
3308    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3309    #[doc = "Glider."]
3310    MAV_ODID_UA_TYPE_GLIDER = 6,
3311    #[doc = "Kite."]
3312    MAV_ODID_UA_TYPE_KITE = 7,
3313    #[doc = "Free Balloon."]
3314    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3315    #[doc = "Captive Balloon."]
3316    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3317    #[doc = "Airship. E.g. a blimp."]
3318    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3319    #[doc = "Free Fall/Parachute (unpowered)."]
3320    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3321    #[doc = "Rocket."]
3322    MAV_ODID_UA_TYPE_ROCKET = 12,
3323    #[doc = "Tethered powered aircraft."]
3324    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3325    #[doc = "Ground Obstacle."]
3326    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3327    #[doc = "Other type of aircraft not listed earlier."]
3328    MAV_ODID_UA_TYPE_OTHER = 15,
3329}
3330impl MavOdidUaType {
3331    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3332}
3333impl Default for MavOdidUaType {
3334    fn default() -> Self {
3335        Self::DEFAULT
3336    }
3337}
3338#[cfg_attr(feature = "ts", derive(TS))]
3339#[cfg_attr(feature = "ts", ts(export))]
3340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3342#[cfg_attr(feature = "serde", serde(tag = "type"))]
3343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3344#[repr(u32)]
3345pub enum MavOdidVerAcc {
3346    #[doc = "The vertical accuracy is unknown."]
3347    MAV_ODID_VER_ACC_UNKNOWN = 0,
3348    #[doc = "The vertical accuracy is smaller than 150 meter."]
3349    MAV_ODID_VER_ACC_150_METER = 1,
3350    #[doc = "The vertical accuracy is smaller than 45 meter."]
3351    MAV_ODID_VER_ACC_45_METER = 2,
3352    #[doc = "The vertical accuracy is smaller than 25 meter."]
3353    MAV_ODID_VER_ACC_25_METER = 3,
3354    #[doc = "The vertical accuracy is smaller than 10 meter."]
3355    MAV_ODID_VER_ACC_10_METER = 4,
3356    #[doc = "The vertical accuracy is smaller than 3 meter."]
3357    MAV_ODID_VER_ACC_3_METER = 5,
3358    #[doc = "The vertical accuracy is smaller than 1 meter."]
3359    MAV_ODID_VER_ACC_1_METER = 6,
3360}
3361impl MavOdidVerAcc {
3362    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3363}
3364impl Default for MavOdidVerAcc {
3365    fn default() -> Self {
3366        Self::DEFAULT
3367    }
3368}
3369#[cfg_attr(feature = "ts", derive(TS))]
3370#[cfg_attr(feature = "ts", ts(export))]
3371#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3373#[cfg_attr(feature = "serde", serde(tag = "type"))]
3374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3375#[repr(u32)]
3376#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3377pub enum MavParamExtType {
3378    #[doc = "8-bit unsigned integer"]
3379    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3380    #[doc = "8-bit signed integer"]
3381    MAV_PARAM_EXT_TYPE_INT8 = 2,
3382    #[doc = "16-bit unsigned integer"]
3383    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3384    #[doc = "16-bit signed integer"]
3385    MAV_PARAM_EXT_TYPE_INT16 = 4,
3386    #[doc = "32-bit unsigned integer"]
3387    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3388    #[doc = "32-bit signed integer"]
3389    MAV_PARAM_EXT_TYPE_INT32 = 6,
3390    #[doc = "64-bit unsigned integer"]
3391    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3392    #[doc = "64-bit signed integer"]
3393    MAV_PARAM_EXT_TYPE_INT64 = 8,
3394    #[doc = "32-bit floating-point"]
3395    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3396    #[doc = "64-bit floating-point"]
3397    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3398    #[doc = "Custom Type"]
3399    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3400}
3401impl MavParamExtType {
3402    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3403}
3404impl Default for MavParamExtType {
3405    fn default() -> Self {
3406        Self::DEFAULT
3407    }
3408}
3409#[cfg_attr(feature = "ts", derive(TS))]
3410#[cfg_attr(feature = "ts", ts(export))]
3411#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3413#[cfg_attr(feature = "serde", serde(tag = "type"))]
3414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3415#[repr(u32)]
3416#[doc = "Specifies the datatype of a MAVLink parameter."]
3417pub enum MavParamType {
3418    #[doc = "8-bit unsigned integer"]
3419    MAV_PARAM_TYPE_UINT8 = 1,
3420    #[doc = "8-bit signed integer"]
3421    MAV_PARAM_TYPE_INT8 = 2,
3422    #[doc = "16-bit unsigned integer"]
3423    MAV_PARAM_TYPE_UINT16 = 3,
3424    #[doc = "16-bit signed integer"]
3425    MAV_PARAM_TYPE_INT16 = 4,
3426    #[doc = "32-bit unsigned integer"]
3427    MAV_PARAM_TYPE_UINT32 = 5,
3428    #[doc = "32-bit signed integer"]
3429    MAV_PARAM_TYPE_INT32 = 6,
3430    #[doc = "64-bit unsigned integer"]
3431    MAV_PARAM_TYPE_UINT64 = 7,
3432    #[doc = "64-bit signed integer"]
3433    MAV_PARAM_TYPE_INT64 = 8,
3434    #[doc = "32-bit floating-point"]
3435    MAV_PARAM_TYPE_REAL32 = 9,
3436    #[doc = "64-bit floating-point"]
3437    MAV_PARAM_TYPE_REAL64 = 10,
3438}
3439impl MavParamType {
3440    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3441}
3442impl Default for MavParamType {
3443    fn default() -> Self {
3444        Self::DEFAULT
3445    }
3446}
3447bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3448impl MavPowerStatus {
3449    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3450}
3451impl Default for MavPowerStatus {
3452    fn default() -> Self {
3453        Self::DEFAULT
3454    }
3455}
3456bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3457impl MavProtocolCapability {
3458    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3459}
3460impl Default for MavProtocolCapability {
3461    fn default() -> Self {
3462        Self::DEFAULT
3463    }
3464}
3465#[cfg_attr(feature = "ts", derive(TS))]
3466#[cfg_attr(feature = "ts", ts(export))]
3467#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3469#[cfg_attr(feature = "serde", serde(tag = "type"))]
3470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3471#[repr(u32)]
3472#[doc = "Result from a MAVLink command (MAV_CMD)"]
3473pub enum MavResult {
3474    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3475    MAV_RESULT_ACCEPTED = 0,
3476    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3477    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3478    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3479    MAV_RESULT_DENIED = 2,
3480    #[doc = "Command is not supported (unknown)."]
3481    MAV_RESULT_UNSUPPORTED = 3,
3482    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3483    MAV_RESULT_FAILED = 4,
3484    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3485    MAV_RESULT_IN_PROGRESS = 5,
3486    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3487    MAV_RESULT_CANCELLED = 6,
3488    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3489    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3490    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3491    MAV_RESULT_COMMAND_INT_ONLY = 8,
3492    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3493    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3494}
3495impl MavResult {
3496    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3497}
3498impl Default for MavResult {
3499    fn default() -> Self {
3500        Self::DEFAULT
3501    }
3502}
3503#[cfg_attr(feature = "ts", derive(TS))]
3504#[cfg_attr(feature = "ts", ts(export))]
3505#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3507#[cfg_attr(feature = "serde", serde(tag = "type"))]
3508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3509#[repr(u32)]
3510#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3511#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3512pub enum MavRoi {
3513    #[doc = "No region of interest."]
3514    MAV_ROI_NONE = 0,
3515    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3516    MAV_ROI_WPNEXT = 1,
3517    #[doc = "Point toward given waypoint."]
3518    MAV_ROI_WPINDEX = 2,
3519    #[doc = "Point toward fixed location."]
3520    MAV_ROI_LOCATION = 3,
3521    #[doc = "Point toward of given id."]
3522    MAV_ROI_TARGET = 4,
3523}
3524impl MavRoi {
3525    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3526}
3527impl Default for MavRoi {
3528    fn default() -> Self {
3529        Self::DEFAULT
3530    }
3531}
3532#[cfg_attr(feature = "ts", derive(TS))]
3533#[cfg_attr(feature = "ts", ts(export))]
3534#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3536#[cfg_attr(feature = "serde", serde(tag = "type"))]
3537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3538#[repr(u32)]
3539#[doc = "Enumeration of sensor orientation, according to its rotations"]
3540pub enum MavSensorOrientation {
3541    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3542    MAV_SENSOR_ROTATION_NONE = 0,
3543    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3544    MAV_SENSOR_ROTATION_YAW_45 = 1,
3545    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3546    MAV_SENSOR_ROTATION_YAW_90 = 2,
3547    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3548    MAV_SENSOR_ROTATION_YAW_135 = 3,
3549    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3550    MAV_SENSOR_ROTATION_YAW_180 = 4,
3551    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3552    MAV_SENSOR_ROTATION_YAW_225 = 5,
3553    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3554    MAV_SENSOR_ROTATION_YAW_270 = 6,
3555    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3556    MAV_SENSOR_ROTATION_YAW_315 = 7,
3557    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3558    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3559    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3560    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3561    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3562    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3563    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3564    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3565    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3566    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3567    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3568    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3569    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3570    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3571    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3572    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3573    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3574    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3575    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3576    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3577    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3578    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3579    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3580    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3581    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3582    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3583    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3584    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3585    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3586    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3587    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3588    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3589    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3590    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3591    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3592    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3593    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3594    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3595    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3596    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3597    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3598    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3599    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3600    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3601    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3602    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3603    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3604    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3605    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3606    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3607    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3608    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3609    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3610    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3611    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3612    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3613    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3614    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3615    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3616    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3617    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3618    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3619    #[doc = "Pitch: 315"]
3620    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3621    #[doc = "Roll: 90, Pitch: 315"]
3622    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3623    #[doc = "Custom orientation"]
3624    MAV_SENSOR_ROTATION_CUSTOM = 100,
3625}
3626impl MavSensorOrientation {
3627    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3628}
3629impl Default for MavSensorOrientation {
3630    fn default() -> Self {
3631        Self::DEFAULT
3632    }
3633}
3634#[cfg_attr(feature = "ts", derive(TS))]
3635#[cfg_attr(feature = "ts", ts(export))]
3636#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3638#[cfg_attr(feature = "serde", serde(tag = "type"))]
3639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3640#[repr(u32)]
3641#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3642pub enum MavSeverity {
3643    #[doc = "System is unusable. This is a \"panic\" condition."]
3644    MAV_SEVERITY_EMERGENCY = 0,
3645    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3646    MAV_SEVERITY_ALERT = 1,
3647    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3648    MAV_SEVERITY_CRITICAL = 2,
3649    #[doc = "Indicates an error in secondary/redundant systems."]
3650    MAV_SEVERITY_ERROR = 3,
3651    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3652    MAV_SEVERITY_WARNING = 4,
3653    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3654    MAV_SEVERITY_NOTICE = 5,
3655    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3656    MAV_SEVERITY_INFO = 6,
3657    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3658    MAV_SEVERITY_DEBUG = 7,
3659}
3660impl MavSeverity {
3661    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3662}
3663impl Default for MavSeverity {
3664    fn default() -> Self {
3665        Self::DEFAULT
3666    }
3667}
3668#[cfg_attr(feature = "ts", derive(TS))]
3669#[cfg_attr(feature = "ts", ts(export))]
3670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3672#[cfg_attr(feature = "serde", serde(tag = "type"))]
3673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3674#[repr(u32)]
3675#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3676pub enum MavStandardMode {
3677    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3678    MAV_STANDARD_MODE_NON_STANDARD = 0,
3679    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3680    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3681    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3682    MAV_STANDARD_MODE_ORBIT = 2,
3683    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3684    MAV_STANDARD_MODE_CRUISE = 3,
3685    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3686    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3687    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3688    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3689    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3690    MAV_STANDARD_MODE_MISSION = 6,
3691    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3692    MAV_STANDARD_MODE_LAND = 7,
3693    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3694    MAV_STANDARD_MODE_TAKEOFF = 8,
3695}
3696impl MavStandardMode {
3697    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3698}
3699impl Default for MavStandardMode {
3700    fn default() -> Self {
3701        Self::DEFAULT
3702    }
3703}
3704#[cfg_attr(feature = "ts", derive(TS))]
3705#[cfg_attr(feature = "ts", ts(export))]
3706#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3708#[cfg_attr(feature = "serde", serde(tag = "type"))]
3709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3710#[repr(u32)]
3711pub enum MavState {
3712    #[doc = "Uninitialized system, state is unknown."]
3713    MAV_STATE_UNINIT = 0,
3714    #[doc = "System is booting up."]
3715    MAV_STATE_BOOT = 1,
3716    #[doc = "System is calibrating and not flight-ready."]
3717    MAV_STATE_CALIBRATING = 2,
3718    #[doc = "System is grounded and on standby. It can be launched any time."]
3719    MAV_STATE_STANDBY = 3,
3720    #[doc = "System is active and might be already airborne. Motors are engaged."]
3721    MAV_STATE_ACTIVE = 4,
3722    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3723    MAV_STATE_CRITICAL = 5,
3724    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3725    MAV_STATE_EMERGENCY = 6,
3726    #[doc = "System just initialized its power-down sequence, will shut down now."]
3727    MAV_STATE_POWEROFF = 7,
3728    #[doc = "System is terminating itself (failsafe or commanded)."]
3729    MAV_STATE_FLIGHT_TERMINATION = 8,
3730}
3731impl MavState {
3732    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3733}
3734impl Default for MavState {
3735    fn default() -> Self {
3736        Self::DEFAULT
3737    }
3738}
3739bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3740impl MavSysStatusSensor {
3741    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3742}
3743impl Default for MavSysStatusSensor {
3744    fn default() -> Self {
3745        Self::DEFAULT
3746    }
3747}
3748bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3749impl MavSysStatusSensorExtended {
3750    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3751}
3752impl Default for MavSysStatusSensorExtended {
3753    fn default() -> Self {
3754        Self::DEFAULT
3755    }
3756}
3757#[cfg_attr(feature = "ts", derive(TS))]
3758#[cfg_attr(feature = "ts", ts(export))]
3759#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3761#[cfg_attr(feature = "serde", serde(tag = "type"))]
3762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3763#[repr(u32)]
3764pub enum MavTunnelPayloadType {
3765    #[doc = "Encoding of payload unknown."]
3766    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3767    #[doc = "Registered for STorM32 gimbal controller."]
3768    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3769    #[doc = "Registered for STorM32 gimbal controller."]
3770    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3771    #[doc = "Registered for STorM32 gimbal controller."]
3772    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3773    #[doc = "Registered for STorM32 gimbal controller."]
3774    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3775    #[doc = "Registered for STorM32 gimbal controller."]
3776    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3777    #[doc = "Registered for STorM32 gimbal controller."]
3778    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3779    #[doc = "Registered for STorM32 gimbal controller."]
3780    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3781    #[doc = "Registered for STorM32 gimbal controller."]
3782    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3783    #[doc = "Registered for STorM32 gimbal controller."]
3784    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3785    #[doc = "Registered for STorM32 gimbal controller."]
3786    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3787    #[doc = "Registered for ModalAI remote OSD protocol."]
3788    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3789    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3790    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3791    #[doc = "Registered for ModalAI vendor use."]
3792    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3793}
3794impl MavTunnelPayloadType {
3795    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3796}
3797impl Default for MavTunnelPayloadType {
3798    fn default() -> Self {
3799        Self::DEFAULT
3800    }
3801}
3802#[cfg_attr(feature = "ts", derive(TS))]
3803#[cfg_attr(feature = "ts", ts(export))]
3804#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3806#[cfg_attr(feature = "serde", serde(tag = "type"))]
3807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3808#[repr(u32)]
3809#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3810pub enum MavType {
3811    #[doc = "Generic micro air vehicle"]
3812    MAV_TYPE_GENERIC = 0,
3813    #[doc = "Fixed wing aircraft."]
3814    MAV_TYPE_FIXED_WING = 1,
3815    #[doc = "Quadrotor"]
3816    MAV_TYPE_QUADROTOR = 2,
3817    #[doc = "Coaxial helicopter"]
3818    MAV_TYPE_COAXIAL = 3,
3819    #[doc = "Normal helicopter with tail rotor."]
3820    MAV_TYPE_HELICOPTER = 4,
3821    #[doc = "Ground installation"]
3822    MAV_TYPE_ANTENNA_TRACKER = 5,
3823    #[doc = "Operator control unit / ground control station"]
3824    MAV_TYPE_GCS = 6,
3825    #[doc = "Airship, controlled"]
3826    MAV_TYPE_AIRSHIP = 7,
3827    #[doc = "Free balloon, uncontrolled"]
3828    MAV_TYPE_FREE_BALLOON = 8,
3829    #[doc = "Rocket"]
3830    MAV_TYPE_ROCKET = 9,
3831    #[doc = "Ground rover"]
3832    MAV_TYPE_GROUND_ROVER = 10,
3833    #[doc = "Surface vessel, boat, ship"]
3834    MAV_TYPE_SURFACE_BOAT = 11,
3835    #[doc = "Submarine"]
3836    MAV_TYPE_SUBMARINE = 12,
3837    #[doc = "Hexarotor"]
3838    MAV_TYPE_HEXAROTOR = 13,
3839    #[doc = "Octorotor"]
3840    MAV_TYPE_OCTOROTOR = 14,
3841    #[doc = "Tricopter"]
3842    MAV_TYPE_TRICOPTER = 15,
3843    #[doc = "Flapping wing"]
3844    MAV_TYPE_FLAPPING_WING = 16,
3845    #[doc = "Kite"]
3846    MAV_TYPE_KITE = 17,
3847    #[doc = "Onboard companion controller"]
3848    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3849    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3850    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3851    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3852    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3853    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3854    MAV_TYPE_VTOL_TILTROTOR = 21,
3855    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3856    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3857    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3858    MAV_TYPE_VTOL_TAILSITTER = 23,
3859    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3860    MAV_TYPE_VTOL_TILTWING = 24,
3861    #[doc = "VTOL reserved 5"]
3862    MAV_TYPE_VTOL_RESERVED5 = 25,
3863    #[doc = "Gimbal"]
3864    MAV_TYPE_GIMBAL = 26,
3865    #[doc = "ADSB system"]
3866    MAV_TYPE_ADSB = 27,
3867    #[doc = "Steerable, nonrigid airfoil"]
3868    MAV_TYPE_PARAFOIL = 28,
3869    #[doc = "Dodecarotor"]
3870    MAV_TYPE_DODECAROTOR = 29,
3871    #[doc = "Camera"]
3872    MAV_TYPE_CAMERA = 30,
3873    #[doc = "Charging station"]
3874    MAV_TYPE_CHARGING_STATION = 31,
3875    #[doc = "FLARM collision avoidance system"]
3876    MAV_TYPE_FLARM = 32,
3877    #[doc = "Servo"]
3878    MAV_TYPE_SERVO = 33,
3879    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3880    MAV_TYPE_ODID = 34,
3881    #[doc = "Decarotor"]
3882    MAV_TYPE_DECAROTOR = 35,
3883    #[doc = "Battery"]
3884    MAV_TYPE_BATTERY = 36,
3885    #[doc = "Parachute"]
3886    MAV_TYPE_PARACHUTE = 37,
3887    #[doc = "Log"]
3888    MAV_TYPE_LOG = 38,
3889    #[doc = "OSD"]
3890    MAV_TYPE_OSD = 39,
3891    #[doc = "IMU"]
3892    MAV_TYPE_IMU = 40,
3893    #[doc = "GPS"]
3894    MAV_TYPE_GPS = 41,
3895    #[doc = "Winch"]
3896    MAV_TYPE_WINCH = 42,
3897    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3898    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3899    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3900    MAV_TYPE_ILLUMINATOR = 44,
3901    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3902    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3903}
3904impl MavType {
3905    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3906}
3907impl Default for MavType {
3908    fn default() -> Self {
3909        Self::DEFAULT
3910    }
3911}
3912#[cfg_attr(feature = "ts", derive(TS))]
3913#[cfg_attr(feature = "ts", ts(export))]
3914#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3916#[cfg_attr(feature = "serde", serde(tag = "type"))]
3917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3918#[repr(u32)]
3919#[doc = "Enumeration of VTOL states"]
3920pub enum MavVtolState {
3921    #[doc = "MAV is not configured as VTOL"]
3922    MAV_VTOL_STATE_UNDEFINED = 0,
3923    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3924    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3925    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3926    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3927    #[doc = "VTOL is in multicopter state"]
3928    MAV_VTOL_STATE_MC = 3,
3929    #[doc = "VTOL is in fixed-wing state"]
3930    MAV_VTOL_STATE_FW = 4,
3931}
3932impl MavVtolState {
3933    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3934}
3935impl Default for MavVtolState {
3936    fn default() -> Self {
3937        Self::DEFAULT
3938    }
3939}
3940bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3941impl MavWinchStatusFlag {
3942    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3943}
3944impl Default for MavWinchStatusFlag {
3945    fn default() -> Self {
3946        Self::DEFAULT
3947    }
3948}
3949#[cfg_attr(feature = "ts", derive(TS))]
3950#[cfg_attr(feature = "ts", ts(export))]
3951#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3953#[cfg_attr(feature = "serde", serde(tag = "type"))]
3954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3955#[repr(u32)]
3956pub enum MavlinkDataStreamType {
3957    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3958    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3959    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3960    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3961    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3962    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3963}
3964impl MavlinkDataStreamType {
3965    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3966}
3967impl Default for MavlinkDataStreamType {
3968    fn default() -> Self {
3969        Self::DEFAULT
3970    }
3971}
3972#[cfg_attr(feature = "ts", derive(TS))]
3973#[cfg_attr(feature = "ts", ts(export))]
3974#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3976#[cfg_attr(feature = "serde", serde(tag = "type"))]
3977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3978#[repr(u32)]
3979#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3980pub enum MissionState {
3981    #[doc = "The mission status reporting is not supported."]
3982    MISSION_STATE_UNKNOWN = 0,
3983    #[doc = "No mission on the vehicle."]
3984    MISSION_STATE_NO_MISSION = 1,
3985    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3986    MISSION_STATE_NOT_STARTED = 2,
3987    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3988    MISSION_STATE_ACTIVE = 3,
3989    #[doc = "Mission is paused when in auto mode."]
3990    MISSION_STATE_PAUSED = 4,
3991    #[doc = "Mission has executed all mission items."]
3992    MISSION_STATE_COMPLETE = 5,
3993}
3994impl MissionState {
3995    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3996}
3997impl Default for MissionState {
3998    fn default() -> Self {
3999        Self::DEFAULT
4000    }
4001}
4002#[cfg_attr(feature = "ts", derive(TS))]
4003#[cfg_attr(feature = "ts", ts(export))]
4004#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4006#[cfg_attr(feature = "serde", serde(tag = "type"))]
4007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4008#[repr(u32)]
4009#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
4010pub enum MotorTestOrder {
4011    #[doc = "Default autopilot motor test method."]
4012    MOTOR_TEST_ORDER_DEFAULT = 0,
4013    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
4014    MOTOR_TEST_ORDER_SEQUENCE = 1,
4015    #[doc = "Motor numbers are specified as the output as labeled on the board."]
4016    MOTOR_TEST_ORDER_BOARD = 2,
4017}
4018impl MotorTestOrder {
4019    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
4020}
4021impl Default for MotorTestOrder {
4022    fn default() -> Self {
4023        Self::DEFAULT
4024    }
4025}
4026#[cfg_attr(feature = "ts", derive(TS))]
4027#[cfg_attr(feature = "ts", ts(export))]
4028#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4030#[cfg_attr(feature = "serde", serde(tag = "type"))]
4031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4032#[repr(u32)]
4033#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
4034pub enum MotorTestThrottleType {
4035    #[doc = "Throttle as a percentage (0 ~ 100)"]
4036    MOTOR_TEST_THROTTLE_PERCENT = 0,
4037    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
4038    MOTOR_TEST_THROTTLE_PWM = 1,
4039    #[doc = "Throttle pass-through from pilot's transmitter."]
4040    MOTOR_TEST_THROTTLE_PILOT = 2,
4041    #[doc = "Per-motor compass calibration test."]
4042    MOTOR_TEST_COMPASS_CAL = 3,
4043}
4044impl MotorTestThrottleType {
4045    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
4046}
4047impl Default for MotorTestThrottleType {
4048    fn default() -> Self {
4049        Self::DEFAULT
4050    }
4051}
4052#[cfg_attr(feature = "ts", derive(TS))]
4053#[cfg_attr(feature = "ts", ts(export))]
4054#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4056#[cfg_attr(feature = "serde", serde(tag = "type"))]
4057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4058#[repr(u32)]
4059pub enum NavVtolLandOptions {
4060    #[doc = "Default autopilot landing behaviour."]
4061    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
4062    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
4063    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
4064    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
4065    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
4066}
4067impl NavVtolLandOptions {
4068    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
4069}
4070impl Default for NavVtolLandOptions {
4071    fn default() -> Self {
4072        Self::DEFAULT
4073    }
4074}
4075#[cfg_attr(feature = "ts", derive(TS))]
4076#[cfg_attr(feature = "ts", ts(export))]
4077#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4079#[cfg_attr(feature = "serde", serde(tag = "type"))]
4080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4081#[repr(u32)]
4082#[doc = "Yaw behaviour during orbit flight."]
4083pub enum OrbitYawBehaviour {
4084    #[doc = "Vehicle front points to the center (default)."]
4085    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
4086    #[doc = "Vehicle front holds heading when message received."]
4087    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
4088    #[doc = "Yaw uncontrolled."]
4089    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
4090    #[doc = "Vehicle front follows flight path (tangential to circle)."]
4091    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
4092    #[doc = "Yaw controlled by RC input."]
4093    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
4094    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
4095    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
4096}
4097impl OrbitYawBehaviour {
4098    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
4099}
4100impl Default for OrbitYawBehaviour {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4113pub enum ParachuteAction {
4114    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4115    PARACHUTE_DISABLE = 0,
4116    #[doc = "Enable auto-release of parachute."]
4117    PARACHUTE_ENABLE = 1,
4118    #[doc = "Release parachute and kill motors."]
4119    PARACHUTE_RELEASE = 2,
4120}
4121impl ParachuteAction {
4122    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4123}
4124impl Default for ParachuteAction {
4125    fn default() -> Self {
4126        Self::DEFAULT
4127    }
4128}
4129#[cfg_attr(feature = "ts", derive(TS))]
4130#[cfg_attr(feature = "ts", ts(export))]
4131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4133#[cfg_attr(feature = "serde", serde(tag = "type"))]
4134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4135#[repr(u32)]
4136#[doc = "Result from PARAM_EXT_SET message."]
4137pub enum ParamAck {
4138    #[doc = "Parameter value ACCEPTED and SET"]
4139    PARAM_ACK_ACCEPTED = 0,
4140    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4141    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4142    #[doc = "Parameter failed to set"]
4143    PARAM_ACK_FAILED = 2,
4144    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4145    PARAM_ACK_IN_PROGRESS = 3,
4146}
4147impl ParamAck {
4148    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4149}
4150impl Default for ParamAck {
4151    fn default() -> Self {
4152        Self::DEFAULT
4153    }
4154}
4155bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4156impl PositionTargetTypemask {
4157    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4158}
4159impl Default for PositionTargetTypemask {
4160    fn default() -> Self {
4161        Self::DEFAULT
4162    }
4163}
4164#[cfg_attr(feature = "ts", derive(TS))]
4165#[cfg_attr(feature = "ts", ts(export))]
4166#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4168#[cfg_attr(feature = "serde", serde(tag = "type"))]
4169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4170#[repr(u32)]
4171#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4172pub enum PrecisionLandMode {
4173    #[doc = "Normal (non-precision) landing."]
4174    PRECISION_LAND_MODE_DISABLED = 0,
4175    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4176    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4177    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4178    PRECISION_LAND_MODE_REQUIRED = 2,
4179}
4180impl PrecisionLandMode {
4181    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4182}
4183impl Default for PrecisionLandMode {
4184    fn default() -> Self {
4185        Self::DEFAULT
4186    }
4187}
4188#[cfg_attr(feature = "ts", derive(TS))]
4189#[cfg_attr(feature = "ts", ts(export))]
4190#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4192#[cfg_attr(feature = "serde", serde(tag = "type"))]
4193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4194#[repr(u32)]
4195#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4196pub enum PreflightStorageMissionAction {
4197    #[doc = "Read current mission data from persistent storage"]
4198    MISSION_READ_PERSISTENT = 0,
4199    #[doc = "Write current mission data to persistent storage"]
4200    MISSION_WRITE_PERSISTENT = 1,
4201    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4202    MISSION_RESET_DEFAULT = 2,
4203}
4204impl PreflightStorageMissionAction {
4205    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4206}
4207impl Default for PreflightStorageMissionAction {
4208    fn default() -> Self {
4209        Self::DEFAULT
4210    }
4211}
4212#[cfg_attr(feature = "ts", derive(TS))]
4213#[cfg_attr(feature = "ts", ts(export))]
4214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4216#[cfg_attr(feature = "serde", serde(tag = "type"))]
4217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4218#[repr(u32)]
4219#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4220pub enum PreflightStorageParameterAction {
4221    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4222    PARAM_READ_PERSISTENT = 0,
4223    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4224    PARAM_WRITE_PERSISTENT = 1,
4225    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4226    PARAM_RESET_CONFIG_DEFAULT = 2,
4227    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4228    PARAM_RESET_SENSOR_DEFAULT = 3,
4229    #[doc = "Reset all parameters, including operation counters, to default values"]
4230    PARAM_RESET_ALL_DEFAULT = 4,
4231}
4232impl PreflightStorageParameterAction {
4233    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4234}
4235impl Default for PreflightStorageParameterAction {
4236    fn default() -> Self {
4237        Self::DEFAULT
4238    }
4239}
4240bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "RADIO_RC_CHANNELS flags (bitmask)."] pub struct RadioRcChannelsFlags : u16 { # [doc = "Failsafe is active. The content of the RC channels data in the RADIO_RC_CHANNELS message is implementation dependent."] const RADIO_RC_CHANNELS_FLAGS_FAILSAFE = 1 ; # [doc = "Channel data may be out of date. This is set when the receiver is unable to validate incoming data from the transmitter and has therefore resent the last valid data it received."] const RADIO_RC_CHANNELS_FLAGS_OUTDATED = 2 ; } }
4241impl RadioRcChannelsFlags {
4242    pub const DEFAULT: Self = Self::RADIO_RC_CHANNELS_FLAGS_FAILSAFE;
4243}
4244impl Default for RadioRcChannelsFlags {
4245    fn default() -> Self {
4246        Self::DEFAULT
4247    }
4248}
4249#[cfg_attr(feature = "ts", derive(TS))]
4250#[cfg_attr(feature = "ts", ts(export))]
4251#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4253#[cfg_attr(feature = "serde", serde(tag = "type"))]
4254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4255#[repr(u32)]
4256#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4257pub enum RcSubType {
4258    #[doc = "Spektrum DSM2"]
4259    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4260    #[doc = "Spektrum DSMX"]
4261    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4262    #[doc = "Spektrum DSMX8"]
4263    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4264}
4265impl RcSubType {
4266    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4267}
4268impl Default for RcSubType {
4269    fn default() -> Self {
4270        Self::DEFAULT
4271    }
4272}
4273#[cfg_attr(feature = "ts", derive(TS))]
4274#[cfg_attr(feature = "ts", ts(export))]
4275#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4277#[cfg_attr(feature = "serde", serde(tag = "type"))]
4278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4279#[repr(u32)]
4280#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4281pub enum RcType {
4282    #[doc = "Spektrum"]
4283    RC_TYPE_SPEKTRUM = 0,
4284    #[doc = "CRSF"]
4285    RC_TYPE_CRSF = 1,
4286}
4287impl RcType {
4288    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4289}
4290impl Default for RcType {
4291    fn default() -> Self {
4292        Self::DEFAULT
4293    }
4294}
4295#[cfg_attr(feature = "ts", derive(TS))]
4296#[cfg_attr(feature = "ts", ts(export))]
4297#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4299#[cfg_attr(feature = "serde", serde(tag = "type"))]
4300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4301#[repr(u32)]
4302#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4303pub enum RebootShutdownConditions {
4304    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4305    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4306    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4307    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4308}
4309impl RebootShutdownConditions {
4310    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4311}
4312impl Default for RebootShutdownConditions {
4313    fn default() -> Self {
4314        Self::DEFAULT
4315    }
4316}
4317#[cfg_attr(feature = "ts", derive(TS))]
4318#[cfg_attr(feature = "ts", ts(export))]
4319#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4321#[cfg_attr(feature = "serde", serde(tag = "type"))]
4322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4323#[repr(u32)]
4324#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4325pub enum RtkBaselineCoordinateSystem {
4326    #[doc = "Earth-centered, Earth-fixed"]
4327    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4328    #[doc = "RTK basestation centered, north, east, down"]
4329    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4330}
4331impl RtkBaselineCoordinateSystem {
4332    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4333}
4334impl Default for RtkBaselineCoordinateSystem {
4335    fn default() -> Self {
4336        Self::DEFAULT
4337    }
4338}
4339#[cfg_attr(feature = "ts", derive(TS))]
4340#[cfg_attr(feature = "ts", ts(export))]
4341#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4343#[cfg_attr(feature = "serde", serde(tag = "type"))]
4344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4345#[repr(u32)]
4346#[doc = "Possible safety switch states."]
4347pub enum SafetySwitchState {
4348    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4349    SAFETY_SWITCH_STATE_SAFE = 0,
4350    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4351    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4352}
4353impl SafetySwitchState {
4354    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4355}
4356impl Default for SafetySwitchState {
4357    fn default() -> Self {
4358        Self::DEFAULT
4359    }
4360}
4361#[cfg_attr(feature = "ts", derive(TS))]
4362#[cfg_attr(feature = "ts", ts(export))]
4363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4365#[cfg_attr(feature = "serde", serde(tag = "type"))]
4366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4367#[repr(u32)]
4368#[doc = "SERIAL_CONTROL device types"]
4369pub enum SerialControlDev {
4370    #[doc = "First telemetry port"]
4371    SERIAL_CONTROL_DEV_TELEM1 = 0,
4372    #[doc = "Second telemetry port"]
4373    SERIAL_CONTROL_DEV_TELEM2 = 1,
4374    #[doc = "First GPS port"]
4375    SERIAL_CONTROL_DEV_GPS1 = 2,
4376    #[doc = "Second GPS port"]
4377    SERIAL_CONTROL_DEV_GPS2 = 3,
4378    #[doc = "system shell"]
4379    SERIAL_CONTROL_DEV_SHELL = 10,
4380    #[doc = "SERIAL0"]
4381    SERIAL_CONTROL_SERIAL0 = 100,
4382    #[doc = "SERIAL1"]
4383    SERIAL_CONTROL_SERIAL1 = 101,
4384    #[doc = "SERIAL2"]
4385    SERIAL_CONTROL_SERIAL2 = 102,
4386    #[doc = "SERIAL3"]
4387    SERIAL_CONTROL_SERIAL3 = 103,
4388    #[doc = "SERIAL4"]
4389    SERIAL_CONTROL_SERIAL4 = 104,
4390    #[doc = "SERIAL5"]
4391    SERIAL_CONTROL_SERIAL5 = 105,
4392    #[doc = "SERIAL6"]
4393    SERIAL_CONTROL_SERIAL6 = 106,
4394    #[doc = "SERIAL7"]
4395    SERIAL_CONTROL_SERIAL7 = 107,
4396    #[doc = "SERIAL8"]
4397    SERIAL_CONTROL_SERIAL8 = 108,
4398    #[doc = "SERIAL9"]
4399    SERIAL_CONTROL_SERIAL9 = 109,
4400}
4401impl SerialControlDev {
4402    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4403}
4404impl Default for SerialControlDev {
4405    fn default() -> Self {
4406        Self::DEFAULT
4407    }
4408}
4409bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4410impl SerialControlFlag {
4411    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4412}
4413impl Default for SerialControlFlag {
4414    fn default() -> Self {
4415        Self::DEFAULT
4416    }
4417}
4418#[cfg_attr(feature = "ts", derive(TS))]
4419#[cfg_attr(feature = "ts", ts(export))]
4420#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4422#[cfg_attr(feature = "serde", serde(tag = "type"))]
4423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4424#[repr(u32)]
4425#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4426pub enum SetFocusType {
4427    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4428    FOCUS_TYPE_STEP = 0,
4429    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4430    FOCUS_TYPE_CONTINUOUS = 1,
4431    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4432    FOCUS_TYPE_RANGE = 2,
4433    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4434    FOCUS_TYPE_METERS = 3,
4435    #[doc = "Focus automatically."]
4436    FOCUS_TYPE_AUTO = 4,
4437    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4438    FOCUS_TYPE_AUTO_SINGLE = 5,
4439    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4440    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4441}
4442impl SetFocusType {
4443    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4444}
4445impl Default for SetFocusType {
4446    fn default() -> Self {
4447        Self::DEFAULT
4448    }
4449}
4450#[cfg_attr(feature = "ts", derive(TS))]
4451#[cfg_attr(feature = "ts", ts(export))]
4452#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4454#[cfg_attr(feature = "serde", serde(tag = "type"))]
4455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4456#[repr(u32)]
4457#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4458pub enum SpeedType {
4459    #[doc = "Airspeed"]
4460    SPEED_TYPE_AIRSPEED = 0,
4461    #[doc = "Groundspeed"]
4462    SPEED_TYPE_GROUNDSPEED = 1,
4463    #[doc = "Climb speed"]
4464    SPEED_TYPE_CLIMB_SPEED = 2,
4465    #[doc = "Descent speed"]
4466    SPEED_TYPE_DESCENT_SPEED = 3,
4467}
4468impl SpeedType {
4469    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4470}
4471impl Default for SpeedType {
4472    fn default() -> Self {
4473        Self::DEFAULT
4474    }
4475}
4476#[cfg_attr(feature = "ts", derive(TS))]
4477#[cfg_attr(feature = "ts", ts(export))]
4478#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4480#[cfg_attr(feature = "serde", serde(tag = "type"))]
4481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4482#[repr(u32)]
4483#[doc = "Flags to indicate the status of camera storage."]
4484pub enum StorageStatus {
4485    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4486    STORAGE_STATUS_EMPTY = 0,
4487    #[doc = "Storage present but unformatted."]
4488    STORAGE_STATUS_UNFORMATTED = 1,
4489    #[doc = "Storage present and ready."]
4490    STORAGE_STATUS_READY = 2,
4491    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4492    STORAGE_STATUS_NOT_SUPPORTED = 3,
4493}
4494impl StorageStatus {
4495    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4496}
4497impl Default for StorageStatus {
4498    fn default() -> Self {
4499        Self::DEFAULT
4500    }
4501}
4502#[cfg_attr(feature = "ts", derive(TS))]
4503#[cfg_attr(feature = "ts", ts(export))]
4504#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4506#[cfg_attr(feature = "serde", serde(tag = "type"))]
4507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4508#[repr(u32)]
4509#[doc = "Flags to indicate the type of storage."]
4510pub enum StorageType {
4511    #[doc = "Storage type is not known."]
4512    STORAGE_TYPE_UNKNOWN = 0,
4513    #[doc = "Storage type is USB device."]
4514    STORAGE_TYPE_USB_STICK = 1,
4515    #[doc = "Storage type is SD card."]
4516    STORAGE_TYPE_SD = 2,
4517    #[doc = "Storage type is microSD card."]
4518    STORAGE_TYPE_MICROSD = 3,
4519    #[doc = "Storage type is CFast."]
4520    STORAGE_TYPE_CF = 4,
4521    #[doc = "Storage type is CFexpress."]
4522    STORAGE_TYPE_CFE = 5,
4523    #[doc = "Storage type is XQD."]
4524    STORAGE_TYPE_XQD = 6,
4525    #[doc = "Storage type is HD mass storage type."]
4526    STORAGE_TYPE_HD = 7,
4527    #[doc = "Storage type is other, not listed type."]
4528    STORAGE_TYPE_OTHER = 254,
4529}
4530impl StorageType {
4531    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4532}
4533impl Default for StorageType {
4534    fn default() -> Self {
4535        Self::DEFAULT
4536    }
4537}
4538bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4539impl StorageUsageFlag {
4540    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4541}
4542impl Default for StorageUsageFlag {
4543    fn default() -> Self {
4544        Self::DEFAULT
4545    }
4546}
4547bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate the sensor reporting capabilities for TARGET_ABSOLUTE."] pub struct TargetAbsoluteSensorCapabilityFlags : u8 { const TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION = 1 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_VELOCITY = 2 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_ACCELERATION = 4 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_ATTITUDE = 8 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_RATES = 16 ; } }
4548impl TargetAbsoluteSensorCapabilityFlags {
4549    pub const DEFAULT: Self = Self::TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION;
4550}
4551impl Default for TargetAbsoluteSensorCapabilityFlags {
4552    fn default() -> Self {
4553        Self::DEFAULT
4554    }
4555}
4556#[cfg_attr(feature = "ts", derive(TS))]
4557#[cfg_attr(feature = "ts", ts(export))]
4558#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4560#[cfg_attr(feature = "serde", serde(tag = "type"))]
4561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4562#[repr(u32)]
4563#[doc = "The frame of a target observation from an onboard sensor."]
4564pub enum TargetObsFrame {
4565    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
4566    TARGET_OBS_FRAME_LOCAL_NED = 0,
4567    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
4568    TARGET_OBS_FRAME_BODY_FRD = 1,
4569    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with an origin that travels with vehicle."]
4570    TARGET_OBS_FRAME_LOCAL_OFFSET_NED = 2,
4571    #[doc = "Other sensor frame for target observations neither in local NED nor in body FRD."]
4572    TARGET_OBS_FRAME_OTHER = 3,
4573}
4574impl TargetObsFrame {
4575    pub const DEFAULT: Self = Self::TARGET_OBS_FRAME_LOCAL_NED;
4576}
4577impl Default for TargetObsFrame {
4578    fn default() -> Self {
4579        Self::DEFAULT
4580    }
4581}
4582#[cfg_attr(feature = "ts", derive(TS))]
4583#[cfg_attr(feature = "ts", ts(export))]
4584#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4586#[cfg_attr(feature = "serde", serde(tag = "type"))]
4587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4588#[repr(u32)]
4589#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4590pub enum TuneFormat {
4591    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4592    TUNE_FORMAT_QBASIC1_1 = 1,
4593    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4594    TUNE_FORMAT_MML_MODERN = 2,
4595}
4596impl TuneFormat {
4597    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4598}
4599impl Default for TuneFormat {
4600    fn default() -> Self {
4601        Self::DEFAULT
4602    }
4603}
4604#[cfg_attr(feature = "ts", derive(TS))]
4605#[cfg_attr(feature = "ts", ts(export))]
4606#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4608#[cfg_attr(feature = "serde", serde(tag = "type"))]
4609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4610#[repr(u32)]
4611#[doc = "Generalized UAVCAN node health"]
4612pub enum UavcanNodeHealth {
4613    #[doc = "The node is functioning properly."]
4614    UAVCAN_NODE_HEALTH_OK = 0,
4615    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4616    UAVCAN_NODE_HEALTH_WARNING = 1,
4617    #[doc = "The node has encountered a major failure."]
4618    UAVCAN_NODE_HEALTH_ERROR = 2,
4619    #[doc = "The node has suffered a fatal malfunction."]
4620    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4621}
4622impl UavcanNodeHealth {
4623    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4624}
4625impl Default for UavcanNodeHealth {
4626    fn default() -> Self {
4627        Self::DEFAULT
4628    }
4629}
4630#[cfg_attr(feature = "ts", derive(TS))]
4631#[cfg_attr(feature = "ts", ts(export))]
4632#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4634#[cfg_attr(feature = "serde", serde(tag = "type"))]
4635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4636#[repr(u32)]
4637#[doc = "Generalized UAVCAN node mode"]
4638pub enum UavcanNodeMode {
4639    #[doc = "The node is performing its primary functions."]
4640    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4641    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4642    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4643    #[doc = "The node is under maintenance."]
4644    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4645    #[doc = "The node is in the process of updating its software."]
4646    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4647    #[doc = "The node is no longer available online."]
4648    UAVCAN_NODE_MODE_OFFLINE = 7,
4649}
4650impl UavcanNodeMode {
4651    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4652}
4653impl Default for UavcanNodeMode {
4654    fn default() -> Self {
4655        Self::DEFAULT
4656    }
4657}
4658bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4659impl UtmDataAvailFlags {
4660    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4661}
4662impl Default for UtmDataAvailFlags {
4663    fn default() -> Self {
4664        Self::DEFAULT
4665    }
4666}
4667#[cfg_attr(feature = "ts", derive(TS))]
4668#[cfg_attr(feature = "ts", ts(export))]
4669#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4671#[cfg_attr(feature = "serde", serde(tag = "type"))]
4672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4673#[repr(u32)]
4674#[doc = "Airborne status of UAS."]
4675pub enum UtmFlightState {
4676    #[doc = "The flight state can't be determined."]
4677    UTM_FLIGHT_STATE_UNKNOWN = 1,
4678    #[doc = "UAS on ground."]
4679    UTM_FLIGHT_STATE_GROUND = 2,
4680    #[doc = "UAS airborne."]
4681    UTM_FLIGHT_STATE_AIRBORNE = 3,
4682    #[doc = "UAS is in an emergency flight state."]
4683    UTM_FLIGHT_STATE_EMERGENCY = 16,
4684    #[doc = "UAS has no active controls."]
4685    UTM_FLIGHT_STATE_NOCTRL = 32,
4686}
4687impl UtmFlightState {
4688    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4689}
4690impl Default for UtmFlightState {
4691    fn default() -> Self {
4692        Self::DEFAULT
4693    }
4694}
4695#[cfg_attr(feature = "ts", derive(TS))]
4696#[cfg_attr(feature = "ts", ts(export))]
4697#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4699#[cfg_attr(feature = "serde", serde(tag = "type"))]
4700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4701#[repr(u32)]
4702#[doc = "Video stream encodings"]
4703pub enum VideoStreamEncoding {
4704    #[doc = "Stream encoding is unknown"]
4705    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4706    #[doc = "Stream encoding is H.264"]
4707    VIDEO_STREAM_ENCODING_H264 = 1,
4708    #[doc = "Stream encoding is H.265"]
4709    VIDEO_STREAM_ENCODING_H265 = 2,
4710}
4711impl VideoStreamEncoding {
4712    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4713}
4714impl Default for VideoStreamEncoding {
4715    fn default() -> Self {
4716        Self::DEFAULT
4717    }
4718}
4719bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4720impl VideoStreamStatusFlags {
4721    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4722}
4723impl Default for VideoStreamStatusFlags {
4724    fn default() -> Self {
4725        Self::DEFAULT
4726    }
4727}
4728#[cfg_attr(feature = "ts", derive(TS))]
4729#[cfg_attr(feature = "ts", ts(export))]
4730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4732#[cfg_attr(feature = "serde", serde(tag = "type"))]
4733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4734#[repr(u32)]
4735#[doc = "Video stream types"]
4736pub enum VideoStreamType {
4737    #[doc = "Stream is RTSP"]
4738    VIDEO_STREAM_TYPE_RTSP = 0,
4739    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4740    VIDEO_STREAM_TYPE_RTPUDP = 1,
4741    #[doc = "Stream is MPEG on TCP"]
4742    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4743    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4744    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4745}
4746impl VideoStreamType {
4747    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4748}
4749impl Default for VideoStreamType {
4750    fn default() -> Self {
4751        Self::DEFAULT
4752    }
4753}
4754#[cfg_attr(feature = "ts", derive(TS))]
4755#[cfg_attr(feature = "ts", ts(export))]
4756#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4758#[cfg_attr(feature = "serde", serde(tag = "type"))]
4759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4760#[repr(u32)]
4761#[doc = "Direction of VTOL transition"]
4762pub enum VtolTransitionHeading {
4763    #[doc = "Respect the heading configuration of the vehicle."]
4764    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4765    #[doc = "Use the heading pointing towards the next waypoint."]
4766    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4767    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4768    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4769    #[doc = "Use the specified heading in parameter 4."]
4770    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4771    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4772    VTOL_TRANSITION_HEADING_ANY = 4,
4773}
4774impl VtolTransitionHeading {
4775    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4776}
4777impl Default for VtolTransitionHeading {
4778    fn default() -> Self {
4779        Self::DEFAULT
4780    }
4781}
4782#[cfg_attr(feature = "ts", derive(TS))]
4783#[cfg_attr(feature = "ts", ts(export))]
4784#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4786#[cfg_attr(feature = "serde", serde(tag = "type"))]
4787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4788#[repr(u32)]
4789#[doc = "WiFi Mode."]
4790pub enum WifiConfigApMode {
4791    #[doc = "WiFi mode is undefined."]
4792    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4793    #[doc = "WiFi configured as an access point."]
4794    WIFI_CONFIG_AP_MODE_AP = 1,
4795    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4796    WIFI_CONFIG_AP_MODE_STATION = 2,
4797    #[doc = "WiFi disabled."]
4798    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4799}
4800impl WifiConfigApMode {
4801    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4802}
4803impl Default for WifiConfigApMode {
4804    fn default() -> Self {
4805        Self::DEFAULT
4806    }
4807}
4808#[cfg_attr(feature = "ts", derive(TS))]
4809#[cfg_attr(feature = "ts", ts(export))]
4810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4812#[cfg_attr(feature = "serde", serde(tag = "type"))]
4813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4814#[repr(u32)]
4815#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4816pub enum WifiConfigApResponse {
4817    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4818    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4819    #[doc = "Changes accepted."]
4820    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4821    #[doc = "Changes rejected."]
4822    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4823    #[doc = "Invalid Mode."]
4824    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4825    #[doc = "Invalid SSID."]
4826    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4827    #[doc = "Invalid Password."]
4828    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4829}
4830impl WifiConfigApResponse {
4831    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4832}
4833impl Default for WifiConfigApResponse {
4834    fn default() -> Self {
4835        Self::DEFAULT
4836    }
4837}
4838#[cfg_attr(feature = "ts", derive(TS))]
4839#[cfg_attr(feature = "ts", ts(export))]
4840#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4842#[cfg_attr(feature = "serde", serde(tag = "type"))]
4843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4844#[repr(u32)]
4845#[doc = "Winch actions."]
4846pub enum WinchActions {
4847    #[doc = "Allow motor to freewheel."]
4848    WINCH_RELAXED = 0,
4849    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4850    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4851    #[doc = "Wind or unwind line at specified rate."]
4852    WINCH_RATE_CONTROL = 2,
4853    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4854    WINCH_LOCK = 3,
4855    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4856    WINCH_DELIVER = 4,
4857    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4858    WINCH_HOLD = 5,
4859    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4860    WINCH_RETRACT = 6,
4861    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4862    WINCH_LOAD_LINE = 7,
4863    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4864    WINCH_ABANDON_LINE = 8,
4865    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4866    WINCH_LOAD_PAYLOAD = 9,
4867}
4868impl WinchActions {
4869    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4870}
4871impl Default for WinchActions {
4872    fn default() -> Self {
4873        Self::DEFAULT
4874    }
4875}
4876#[doc = "Set the vehicle attitude and body angular rates."]
4877#[doc = ""]
4878#[doc = "ID: 140"]
4879#[derive(Debug, Clone, PartialEq)]
4880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4882#[cfg_attr(feature = "ts", derive(TS))]
4883#[cfg_attr(feature = "ts", ts(export))]
4884pub struct ACTUATOR_CONTROL_TARGET_DATA {
4885    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4886    pub time_usec: u64,
4887    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4888    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4889    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4890    pub controls: [f32; 8],
4891    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4892    pub group_mlx: u8,
4893}
4894impl ACTUATOR_CONTROL_TARGET_DATA {
4895    pub const ENCODED_LEN: usize = 41usize;
4896    pub const DEFAULT: Self = Self {
4897        time_usec: 0_u64,
4898        controls: [0.0_f32; 8usize],
4899        group_mlx: 0_u8,
4900    };
4901    #[cfg(feature = "arbitrary")]
4902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4903        use arbitrary::{Arbitrary, Unstructured};
4904        let mut buf = [0u8; 1024];
4905        rng.fill_bytes(&mut buf);
4906        let mut unstructured = Unstructured::new(&buf);
4907        Self::arbitrary(&mut unstructured).unwrap_or_default()
4908    }
4909}
4910impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4911    fn default() -> Self {
4912        Self::DEFAULT.clone()
4913    }
4914}
4915impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4916    type Message = MavMessage;
4917    const ID: u32 = 140u32;
4918    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4919    const EXTRA_CRC: u8 = 181u8;
4920    const ENCODED_LEN: usize = 41usize;
4921    fn deser(
4922        _version: MavlinkVersion,
4923        __input: &[u8],
4924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4925        let avail_len = __input.len();
4926        let mut payload_buf = [0; Self::ENCODED_LEN];
4927        let mut buf = if avail_len < Self::ENCODED_LEN {
4928            payload_buf[0..avail_len].copy_from_slice(__input);
4929            Bytes::new(&payload_buf)
4930        } else {
4931            Bytes::new(__input)
4932        };
4933        let mut __struct = Self::default();
4934        __struct.time_usec = buf.get_u64_le();
4935        for v in &mut __struct.controls {
4936            let val = buf.get_f32_le();
4937            *v = val;
4938        }
4939        __struct.group_mlx = buf.get_u8();
4940        Ok(__struct)
4941    }
4942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4943        let mut __tmp = BytesMut::new(bytes);
4944        #[allow(clippy::absurd_extreme_comparisons)]
4945        #[allow(unused_comparisons)]
4946        if __tmp.remaining() < Self::ENCODED_LEN {
4947            panic!(
4948                "buffer is too small (need {} bytes, but got {})",
4949                Self::ENCODED_LEN,
4950                __tmp.remaining(),
4951            )
4952        }
4953        __tmp.put_u64_le(self.time_usec);
4954        for val in &self.controls {
4955            __tmp.put_f32_le(*val);
4956        }
4957        __tmp.put_u8(self.group_mlx);
4958        if matches!(version, MavlinkVersion::V2) {
4959            let len = __tmp.len();
4960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4961        } else {
4962            __tmp.len()
4963        }
4964    }
4965}
4966#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4967#[doc = ""]
4968#[doc = "ID: 375"]
4969#[derive(Debug, Clone, PartialEq)]
4970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4972#[cfg_attr(feature = "ts", derive(TS))]
4973#[cfg_attr(feature = "ts", ts(export))]
4974pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4975    #[doc = "Timestamp (since system boot)."]
4976    pub time_usec: u64,
4977    #[doc = "Active outputs"]
4978    pub active: u32,
4979    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4980    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4981    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4982    pub actuator: [f32; 32],
4983}
4984impl ACTUATOR_OUTPUT_STATUS_DATA {
4985    pub const ENCODED_LEN: usize = 140usize;
4986    pub const DEFAULT: Self = Self {
4987        time_usec: 0_u64,
4988        active: 0_u32,
4989        actuator: [0.0_f32; 32usize],
4990    };
4991    #[cfg(feature = "arbitrary")]
4992    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4993        use arbitrary::{Arbitrary, Unstructured};
4994        let mut buf = [0u8; 1024];
4995        rng.fill_bytes(&mut buf);
4996        let mut unstructured = Unstructured::new(&buf);
4997        Self::arbitrary(&mut unstructured).unwrap_or_default()
4998    }
4999}
5000impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
5001    fn default() -> Self {
5002        Self::DEFAULT.clone()
5003    }
5004}
5005impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
5006    type Message = MavMessage;
5007    const ID: u32 = 375u32;
5008    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
5009    const EXTRA_CRC: u8 = 251u8;
5010    const ENCODED_LEN: usize = 140usize;
5011    fn deser(
5012        _version: MavlinkVersion,
5013        __input: &[u8],
5014    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5015        let avail_len = __input.len();
5016        let mut payload_buf = [0; Self::ENCODED_LEN];
5017        let mut buf = if avail_len < Self::ENCODED_LEN {
5018            payload_buf[0..avail_len].copy_from_slice(__input);
5019            Bytes::new(&payload_buf)
5020        } else {
5021            Bytes::new(__input)
5022        };
5023        let mut __struct = Self::default();
5024        __struct.time_usec = buf.get_u64_le();
5025        __struct.active = buf.get_u32_le();
5026        for v in &mut __struct.actuator {
5027            let val = buf.get_f32_le();
5028            *v = val;
5029        }
5030        Ok(__struct)
5031    }
5032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5033        let mut __tmp = BytesMut::new(bytes);
5034        #[allow(clippy::absurd_extreme_comparisons)]
5035        #[allow(unused_comparisons)]
5036        if __tmp.remaining() < Self::ENCODED_LEN {
5037            panic!(
5038                "buffer is too small (need {} bytes, but got {})",
5039                Self::ENCODED_LEN,
5040                __tmp.remaining(),
5041            )
5042        }
5043        __tmp.put_u64_le(self.time_usec);
5044        __tmp.put_u32_le(self.active);
5045        for val in &self.actuator {
5046            __tmp.put_f32_le(*val);
5047        }
5048        if matches!(version, MavlinkVersion::V2) {
5049            let len = __tmp.len();
5050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5051        } else {
5052            __tmp.len()
5053        }
5054    }
5055}
5056#[doc = "The location and information of an ADSB vehicle."]
5057#[doc = ""]
5058#[doc = "ID: 246"]
5059#[derive(Debug, Clone, PartialEq)]
5060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5062#[cfg_attr(feature = "ts", derive(TS))]
5063#[cfg_attr(feature = "ts", ts(export))]
5064pub struct ADSB_VEHICLE_DATA {
5065    #[doc = "ICAO address"]
5066    pub ICAO_address: u32,
5067    #[doc = "Latitude"]
5068    pub lat: i32,
5069    #[doc = "Longitude"]
5070    pub lon: i32,
5071    #[doc = "Altitude(ASL)"]
5072    pub altitude: i32,
5073    #[doc = "Course over ground"]
5074    pub heading: u16,
5075    #[doc = "The horizontal velocity"]
5076    pub hor_velocity: u16,
5077    #[doc = "The vertical velocity. Positive is up"]
5078    pub ver_velocity: i16,
5079    #[doc = "Bitmap to indicate various statuses including valid data fields"]
5080    pub flags: AdsbFlags,
5081    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
5082    pub squawk: u16,
5083    #[doc = "ADSB altitude type."]
5084    pub altitude_type: AdsbAltitudeType,
5085    #[doc = "The callsign, 8+null"]
5086    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5087    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5088    pub callsign: [u8; 9],
5089    #[doc = "ADSB emitter type."]
5090    pub emitter_type: AdsbEmitterType,
5091    #[doc = "Time since last communication in seconds"]
5092    pub tslc: u8,
5093}
5094impl ADSB_VEHICLE_DATA {
5095    pub const ENCODED_LEN: usize = 38usize;
5096    pub const DEFAULT: Self = Self {
5097        ICAO_address: 0_u32,
5098        lat: 0_i32,
5099        lon: 0_i32,
5100        altitude: 0_i32,
5101        heading: 0_u16,
5102        hor_velocity: 0_u16,
5103        ver_velocity: 0_i16,
5104        flags: AdsbFlags::DEFAULT,
5105        squawk: 0_u16,
5106        altitude_type: AdsbAltitudeType::DEFAULT,
5107        callsign: [0_u8; 9usize],
5108        emitter_type: AdsbEmitterType::DEFAULT,
5109        tslc: 0_u8,
5110    };
5111    #[cfg(feature = "arbitrary")]
5112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5113        use arbitrary::{Arbitrary, Unstructured};
5114        let mut buf = [0u8; 1024];
5115        rng.fill_bytes(&mut buf);
5116        let mut unstructured = Unstructured::new(&buf);
5117        Self::arbitrary(&mut unstructured).unwrap_or_default()
5118    }
5119}
5120impl Default for ADSB_VEHICLE_DATA {
5121    fn default() -> Self {
5122        Self::DEFAULT.clone()
5123    }
5124}
5125impl MessageData for ADSB_VEHICLE_DATA {
5126    type Message = MavMessage;
5127    const ID: u32 = 246u32;
5128    const NAME: &'static str = "ADSB_VEHICLE";
5129    const EXTRA_CRC: u8 = 184u8;
5130    const ENCODED_LEN: usize = 38usize;
5131    fn deser(
5132        _version: MavlinkVersion,
5133        __input: &[u8],
5134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5135        let avail_len = __input.len();
5136        let mut payload_buf = [0; Self::ENCODED_LEN];
5137        let mut buf = if avail_len < Self::ENCODED_LEN {
5138            payload_buf[0..avail_len].copy_from_slice(__input);
5139            Bytes::new(&payload_buf)
5140        } else {
5141            Bytes::new(__input)
5142        };
5143        let mut __struct = Self::default();
5144        __struct.ICAO_address = buf.get_u32_le();
5145        __struct.lat = buf.get_i32_le();
5146        __struct.lon = buf.get_i32_le();
5147        __struct.altitude = buf.get_i32_le();
5148        __struct.heading = buf.get_u16_le();
5149        __struct.hor_velocity = buf.get_u16_le();
5150        __struct.ver_velocity = buf.get_i16_le();
5151        let tmp = buf.get_u16_le();
5152        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
5153            ::mavlink_core::error::ParserError::InvalidFlag {
5154                flag_type: "AdsbFlags",
5155                value: tmp as u32,
5156            },
5157        )?;
5158        __struct.squawk = buf.get_u16_le();
5159        let tmp = buf.get_u8();
5160        __struct.altitude_type =
5161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5162                enum_type: "AdsbAltitudeType",
5163                value: tmp as u32,
5164            })?;
5165        for v in &mut __struct.callsign {
5166            let val = buf.get_u8();
5167            *v = val;
5168        }
5169        let tmp = buf.get_u8();
5170        __struct.emitter_type =
5171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5172                enum_type: "AdsbEmitterType",
5173                value: tmp as u32,
5174            })?;
5175        __struct.tslc = buf.get_u8();
5176        Ok(__struct)
5177    }
5178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5179        let mut __tmp = BytesMut::new(bytes);
5180        #[allow(clippy::absurd_extreme_comparisons)]
5181        #[allow(unused_comparisons)]
5182        if __tmp.remaining() < Self::ENCODED_LEN {
5183            panic!(
5184                "buffer is too small (need {} bytes, but got {})",
5185                Self::ENCODED_LEN,
5186                __tmp.remaining(),
5187            )
5188        }
5189        __tmp.put_u32_le(self.ICAO_address);
5190        __tmp.put_i32_le(self.lat);
5191        __tmp.put_i32_le(self.lon);
5192        __tmp.put_i32_le(self.altitude);
5193        __tmp.put_u16_le(self.heading);
5194        __tmp.put_u16_le(self.hor_velocity);
5195        __tmp.put_i16_le(self.ver_velocity);
5196        __tmp.put_u16_le(self.flags.bits());
5197        __tmp.put_u16_le(self.squawk);
5198        __tmp.put_u8(self.altitude_type as u8);
5199        for val in &self.callsign {
5200            __tmp.put_u8(*val);
5201        }
5202        __tmp.put_u8(self.emitter_type as u8);
5203        __tmp.put_u8(self.tslc);
5204        if matches!(version, MavlinkVersion::V2) {
5205            let len = __tmp.len();
5206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5207        } else {
5208            __tmp.len()
5209        }
5210    }
5211}
5212#[doc = "Airspeed information from a sensor."]
5213#[doc = ""]
5214#[doc = "ID: 295"]
5215#[derive(Debug, Clone, PartialEq)]
5216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5218#[cfg_attr(feature = "ts", derive(TS))]
5219#[cfg_attr(feature = "ts", ts(export))]
5220pub struct AIRSPEED_DATA {
5221    #[doc = "Calibrated airspeed (CAS)."]
5222    pub airspeed: f32,
5223    #[doc = "Raw differential pressure. NaN for value unknown/not supplied."]
5224    pub raw_press: f32,
5225    #[doc = "Temperature. INT16_MAX for value unknown/not supplied."]
5226    pub temperature: i16,
5227    #[doc = "Sensor ID."]
5228    pub id: u8,
5229    #[doc = "Airspeed sensor flags."]
5230    pub flags: AirspeedSensorFlags,
5231}
5232impl AIRSPEED_DATA {
5233    pub const ENCODED_LEN: usize = 12usize;
5234    pub const DEFAULT: Self = Self {
5235        airspeed: 0.0_f32,
5236        raw_press: 0.0_f32,
5237        temperature: 0_i16,
5238        id: 0_u8,
5239        flags: AirspeedSensorFlags::DEFAULT,
5240    };
5241    #[cfg(feature = "arbitrary")]
5242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5243        use arbitrary::{Arbitrary, Unstructured};
5244        let mut buf = [0u8; 1024];
5245        rng.fill_bytes(&mut buf);
5246        let mut unstructured = Unstructured::new(&buf);
5247        Self::arbitrary(&mut unstructured).unwrap_or_default()
5248    }
5249}
5250impl Default for AIRSPEED_DATA {
5251    fn default() -> Self {
5252        Self::DEFAULT.clone()
5253    }
5254}
5255impl MessageData for AIRSPEED_DATA {
5256    type Message = MavMessage;
5257    const ID: u32 = 295u32;
5258    const NAME: &'static str = "AIRSPEED";
5259    const EXTRA_CRC: u8 = 234u8;
5260    const ENCODED_LEN: usize = 12usize;
5261    fn deser(
5262        _version: MavlinkVersion,
5263        __input: &[u8],
5264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5265        let avail_len = __input.len();
5266        let mut payload_buf = [0; Self::ENCODED_LEN];
5267        let mut buf = if avail_len < Self::ENCODED_LEN {
5268            payload_buf[0..avail_len].copy_from_slice(__input);
5269            Bytes::new(&payload_buf)
5270        } else {
5271            Bytes::new(__input)
5272        };
5273        let mut __struct = Self::default();
5274        __struct.airspeed = buf.get_f32_le();
5275        __struct.raw_press = buf.get_f32_le();
5276        __struct.temperature = buf.get_i16_le();
5277        __struct.id = buf.get_u8();
5278        let tmp = buf.get_u8();
5279        __struct.flags = AirspeedSensorFlags::from_bits(tmp & AirspeedSensorFlags::all().bits())
5280            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5281                flag_type: "AirspeedSensorFlags",
5282                value: tmp as u32,
5283            })?;
5284        Ok(__struct)
5285    }
5286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5287        let mut __tmp = BytesMut::new(bytes);
5288        #[allow(clippy::absurd_extreme_comparisons)]
5289        #[allow(unused_comparisons)]
5290        if __tmp.remaining() < Self::ENCODED_LEN {
5291            panic!(
5292                "buffer is too small (need {} bytes, but got {})",
5293                Self::ENCODED_LEN,
5294                __tmp.remaining(),
5295            )
5296        }
5297        __tmp.put_f32_le(self.airspeed);
5298        __tmp.put_f32_le(self.raw_press);
5299        __tmp.put_i16_le(self.temperature);
5300        __tmp.put_u8(self.id);
5301        __tmp.put_u8(self.flags.bits());
5302        if matches!(version, MavlinkVersion::V2) {
5303            let len = __tmp.len();
5304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5305        } else {
5306            __tmp.len()
5307        }
5308    }
5309}
5310#[doc = "The location and information of an AIS vessel."]
5311#[doc = ""]
5312#[doc = "ID: 301"]
5313#[derive(Debug, Clone, PartialEq)]
5314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5316#[cfg_attr(feature = "ts", derive(TS))]
5317#[cfg_attr(feature = "ts", ts(export))]
5318pub struct AIS_VESSEL_DATA {
5319    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5320    pub MMSI: u32,
5321    #[doc = "Latitude"]
5322    pub lat: i32,
5323    #[doc = "Longitude"]
5324    pub lon: i32,
5325    #[doc = "Course over ground"]
5326    pub COG: u16,
5327    #[doc = "True heading"]
5328    pub heading: u16,
5329    #[doc = "Speed over ground"]
5330    pub velocity: u16,
5331    #[doc = "Distance from lat/lon location to bow"]
5332    pub dimension_bow: u16,
5333    #[doc = "Distance from lat/lon location to stern"]
5334    pub dimension_stern: u16,
5335    #[doc = "Time since last communication in seconds"]
5336    pub tslc: u16,
5337    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5338    pub flags: AisFlags,
5339    #[doc = "Turn rate"]
5340    pub turn_rate: i8,
5341    #[doc = "Navigational status"]
5342    pub navigational_status: AisNavStatus,
5343    #[doc = "Type of vessels"]
5344    pub mavtype: AisType,
5345    #[doc = "Distance from lat/lon location to port side"]
5346    pub dimension_port: u8,
5347    #[doc = "Distance from lat/lon location to starboard side"]
5348    pub dimension_starboard: u8,
5349    #[doc = "The vessel callsign"]
5350    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5351    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5352    pub callsign: [u8; 7],
5353    #[doc = "The vessel name"]
5354    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5355    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5356    pub name: [u8; 20],
5357}
5358impl AIS_VESSEL_DATA {
5359    pub const ENCODED_LEN: usize = 58usize;
5360    pub const DEFAULT: Self = Self {
5361        MMSI: 0_u32,
5362        lat: 0_i32,
5363        lon: 0_i32,
5364        COG: 0_u16,
5365        heading: 0_u16,
5366        velocity: 0_u16,
5367        dimension_bow: 0_u16,
5368        dimension_stern: 0_u16,
5369        tslc: 0_u16,
5370        flags: AisFlags::DEFAULT,
5371        turn_rate: 0_i8,
5372        navigational_status: AisNavStatus::DEFAULT,
5373        mavtype: AisType::DEFAULT,
5374        dimension_port: 0_u8,
5375        dimension_starboard: 0_u8,
5376        callsign: [0_u8; 7usize],
5377        name: [0_u8; 20usize],
5378    };
5379    #[cfg(feature = "arbitrary")]
5380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5381        use arbitrary::{Arbitrary, Unstructured};
5382        let mut buf = [0u8; 1024];
5383        rng.fill_bytes(&mut buf);
5384        let mut unstructured = Unstructured::new(&buf);
5385        Self::arbitrary(&mut unstructured).unwrap_or_default()
5386    }
5387}
5388impl Default for AIS_VESSEL_DATA {
5389    fn default() -> Self {
5390        Self::DEFAULT.clone()
5391    }
5392}
5393impl MessageData for AIS_VESSEL_DATA {
5394    type Message = MavMessage;
5395    const ID: u32 = 301u32;
5396    const NAME: &'static str = "AIS_VESSEL";
5397    const EXTRA_CRC: u8 = 243u8;
5398    const ENCODED_LEN: usize = 58usize;
5399    fn deser(
5400        _version: MavlinkVersion,
5401        __input: &[u8],
5402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5403        let avail_len = __input.len();
5404        let mut payload_buf = [0; Self::ENCODED_LEN];
5405        let mut buf = if avail_len < Self::ENCODED_LEN {
5406            payload_buf[0..avail_len].copy_from_slice(__input);
5407            Bytes::new(&payload_buf)
5408        } else {
5409            Bytes::new(__input)
5410        };
5411        let mut __struct = Self::default();
5412        __struct.MMSI = buf.get_u32_le();
5413        __struct.lat = buf.get_i32_le();
5414        __struct.lon = buf.get_i32_le();
5415        __struct.COG = buf.get_u16_le();
5416        __struct.heading = buf.get_u16_le();
5417        __struct.velocity = buf.get_u16_le();
5418        __struct.dimension_bow = buf.get_u16_le();
5419        __struct.dimension_stern = buf.get_u16_le();
5420        __struct.tslc = buf.get_u16_le();
5421        let tmp = buf.get_u16_le();
5422        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5423            ::mavlink_core::error::ParserError::InvalidFlag {
5424                flag_type: "AisFlags",
5425                value: tmp as u32,
5426            },
5427        )?;
5428        __struct.turn_rate = buf.get_i8();
5429        let tmp = buf.get_u8();
5430        __struct.navigational_status =
5431            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5432                enum_type: "AisNavStatus",
5433                value: tmp as u32,
5434            })?;
5435        let tmp = buf.get_u8();
5436        __struct.mavtype =
5437            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5438                enum_type: "AisType",
5439                value: tmp as u32,
5440            })?;
5441        __struct.dimension_port = buf.get_u8();
5442        __struct.dimension_starboard = buf.get_u8();
5443        for v in &mut __struct.callsign {
5444            let val = buf.get_u8();
5445            *v = val;
5446        }
5447        for v in &mut __struct.name {
5448            let val = buf.get_u8();
5449            *v = val;
5450        }
5451        Ok(__struct)
5452    }
5453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5454        let mut __tmp = BytesMut::new(bytes);
5455        #[allow(clippy::absurd_extreme_comparisons)]
5456        #[allow(unused_comparisons)]
5457        if __tmp.remaining() < Self::ENCODED_LEN {
5458            panic!(
5459                "buffer is too small (need {} bytes, but got {})",
5460                Self::ENCODED_LEN,
5461                __tmp.remaining(),
5462            )
5463        }
5464        __tmp.put_u32_le(self.MMSI);
5465        __tmp.put_i32_le(self.lat);
5466        __tmp.put_i32_le(self.lon);
5467        __tmp.put_u16_le(self.COG);
5468        __tmp.put_u16_le(self.heading);
5469        __tmp.put_u16_le(self.velocity);
5470        __tmp.put_u16_le(self.dimension_bow);
5471        __tmp.put_u16_le(self.dimension_stern);
5472        __tmp.put_u16_le(self.tslc);
5473        __tmp.put_u16_le(self.flags.bits());
5474        __tmp.put_i8(self.turn_rate);
5475        __tmp.put_u8(self.navigational_status as u8);
5476        __tmp.put_u8(self.mavtype as u8);
5477        __tmp.put_u8(self.dimension_port);
5478        __tmp.put_u8(self.dimension_starboard);
5479        for val in &self.callsign {
5480            __tmp.put_u8(*val);
5481        }
5482        for val in &self.name {
5483            __tmp.put_u8(*val);
5484        }
5485        if matches!(version, MavlinkVersion::V2) {
5486            let len = __tmp.len();
5487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5488        } else {
5489            __tmp.len()
5490        }
5491    }
5492}
5493#[doc = "The current system altitude."]
5494#[doc = ""]
5495#[doc = "ID: 141"]
5496#[derive(Debug, Clone, PartialEq)]
5497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5499#[cfg_attr(feature = "ts", derive(TS))]
5500#[cfg_attr(feature = "ts", ts(export))]
5501pub struct ALTITUDE_DATA {
5502    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5503    pub time_usec: u64,
5504    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5505    pub altitude_monotonic: f32,
5506    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5507    pub altitude_amsl: f32,
5508    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5509    pub altitude_local: f32,
5510    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5511    pub altitude_relative: f32,
5512    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5513    pub altitude_terrain: f32,
5514    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5515    pub bottom_clearance: f32,
5516}
5517impl ALTITUDE_DATA {
5518    pub const ENCODED_LEN: usize = 32usize;
5519    pub const DEFAULT: Self = Self {
5520        time_usec: 0_u64,
5521        altitude_monotonic: 0.0_f32,
5522        altitude_amsl: 0.0_f32,
5523        altitude_local: 0.0_f32,
5524        altitude_relative: 0.0_f32,
5525        altitude_terrain: 0.0_f32,
5526        bottom_clearance: 0.0_f32,
5527    };
5528    #[cfg(feature = "arbitrary")]
5529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5530        use arbitrary::{Arbitrary, Unstructured};
5531        let mut buf = [0u8; 1024];
5532        rng.fill_bytes(&mut buf);
5533        let mut unstructured = Unstructured::new(&buf);
5534        Self::arbitrary(&mut unstructured).unwrap_or_default()
5535    }
5536}
5537impl Default for ALTITUDE_DATA {
5538    fn default() -> Self {
5539        Self::DEFAULT.clone()
5540    }
5541}
5542impl MessageData for ALTITUDE_DATA {
5543    type Message = MavMessage;
5544    const ID: u32 = 141u32;
5545    const NAME: &'static str = "ALTITUDE";
5546    const EXTRA_CRC: u8 = 47u8;
5547    const ENCODED_LEN: usize = 32usize;
5548    fn deser(
5549        _version: MavlinkVersion,
5550        __input: &[u8],
5551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5552        let avail_len = __input.len();
5553        let mut payload_buf = [0; Self::ENCODED_LEN];
5554        let mut buf = if avail_len < Self::ENCODED_LEN {
5555            payload_buf[0..avail_len].copy_from_slice(__input);
5556            Bytes::new(&payload_buf)
5557        } else {
5558            Bytes::new(__input)
5559        };
5560        let mut __struct = Self::default();
5561        __struct.time_usec = buf.get_u64_le();
5562        __struct.altitude_monotonic = buf.get_f32_le();
5563        __struct.altitude_amsl = buf.get_f32_le();
5564        __struct.altitude_local = buf.get_f32_le();
5565        __struct.altitude_relative = buf.get_f32_le();
5566        __struct.altitude_terrain = buf.get_f32_le();
5567        __struct.bottom_clearance = buf.get_f32_le();
5568        Ok(__struct)
5569    }
5570    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5571        let mut __tmp = BytesMut::new(bytes);
5572        #[allow(clippy::absurd_extreme_comparisons)]
5573        #[allow(unused_comparisons)]
5574        if __tmp.remaining() < Self::ENCODED_LEN {
5575            panic!(
5576                "buffer is too small (need {} bytes, but got {})",
5577                Self::ENCODED_LEN,
5578                __tmp.remaining(),
5579            )
5580        }
5581        __tmp.put_u64_le(self.time_usec);
5582        __tmp.put_f32_le(self.altitude_monotonic);
5583        __tmp.put_f32_le(self.altitude_amsl);
5584        __tmp.put_f32_le(self.altitude_local);
5585        __tmp.put_f32_le(self.altitude_relative);
5586        __tmp.put_f32_le(self.altitude_terrain);
5587        __tmp.put_f32_le(self.bottom_clearance);
5588        if matches!(version, MavlinkVersion::V2) {
5589            let len = __tmp.len();
5590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5591        } else {
5592            __tmp.len()
5593        }
5594    }
5595}
5596#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5597#[doc = ""]
5598#[doc = "ID: 30"]
5599#[derive(Debug, Clone, PartialEq)]
5600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5602#[cfg_attr(feature = "ts", derive(TS))]
5603#[cfg_attr(feature = "ts", ts(export))]
5604pub struct ATTITUDE_DATA {
5605    #[doc = "Timestamp (time since system boot)."]
5606    pub time_boot_ms: u32,
5607    #[doc = "Roll angle (-pi..+pi)"]
5608    pub roll: f32,
5609    #[doc = "Pitch angle (-pi..+pi)"]
5610    pub pitch: f32,
5611    #[doc = "Yaw angle (-pi..+pi)"]
5612    pub yaw: f32,
5613    #[doc = "Roll angular speed"]
5614    pub rollspeed: f32,
5615    #[doc = "Pitch angular speed"]
5616    pub pitchspeed: f32,
5617    #[doc = "Yaw angular speed"]
5618    pub yawspeed: f32,
5619}
5620impl ATTITUDE_DATA {
5621    pub const ENCODED_LEN: usize = 28usize;
5622    pub const DEFAULT: Self = Self {
5623        time_boot_ms: 0_u32,
5624        roll: 0.0_f32,
5625        pitch: 0.0_f32,
5626        yaw: 0.0_f32,
5627        rollspeed: 0.0_f32,
5628        pitchspeed: 0.0_f32,
5629        yawspeed: 0.0_f32,
5630    };
5631    #[cfg(feature = "arbitrary")]
5632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5633        use arbitrary::{Arbitrary, Unstructured};
5634        let mut buf = [0u8; 1024];
5635        rng.fill_bytes(&mut buf);
5636        let mut unstructured = Unstructured::new(&buf);
5637        Self::arbitrary(&mut unstructured).unwrap_or_default()
5638    }
5639}
5640impl Default for ATTITUDE_DATA {
5641    fn default() -> Self {
5642        Self::DEFAULT.clone()
5643    }
5644}
5645impl MessageData for ATTITUDE_DATA {
5646    type Message = MavMessage;
5647    const ID: u32 = 30u32;
5648    const NAME: &'static str = "ATTITUDE";
5649    const EXTRA_CRC: u8 = 39u8;
5650    const ENCODED_LEN: usize = 28usize;
5651    fn deser(
5652        _version: MavlinkVersion,
5653        __input: &[u8],
5654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5655        let avail_len = __input.len();
5656        let mut payload_buf = [0; Self::ENCODED_LEN];
5657        let mut buf = if avail_len < Self::ENCODED_LEN {
5658            payload_buf[0..avail_len].copy_from_slice(__input);
5659            Bytes::new(&payload_buf)
5660        } else {
5661            Bytes::new(__input)
5662        };
5663        let mut __struct = Self::default();
5664        __struct.time_boot_ms = buf.get_u32_le();
5665        __struct.roll = buf.get_f32_le();
5666        __struct.pitch = buf.get_f32_le();
5667        __struct.yaw = buf.get_f32_le();
5668        __struct.rollspeed = buf.get_f32_le();
5669        __struct.pitchspeed = buf.get_f32_le();
5670        __struct.yawspeed = buf.get_f32_le();
5671        Ok(__struct)
5672    }
5673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5674        let mut __tmp = BytesMut::new(bytes);
5675        #[allow(clippy::absurd_extreme_comparisons)]
5676        #[allow(unused_comparisons)]
5677        if __tmp.remaining() < Self::ENCODED_LEN {
5678            panic!(
5679                "buffer is too small (need {} bytes, but got {})",
5680                Self::ENCODED_LEN,
5681                __tmp.remaining(),
5682            )
5683        }
5684        __tmp.put_u32_le(self.time_boot_ms);
5685        __tmp.put_f32_le(self.roll);
5686        __tmp.put_f32_le(self.pitch);
5687        __tmp.put_f32_le(self.yaw);
5688        __tmp.put_f32_le(self.rollspeed);
5689        __tmp.put_f32_le(self.pitchspeed);
5690        __tmp.put_f32_le(self.yawspeed);
5691        if matches!(version, MavlinkVersion::V2) {
5692            let len = __tmp.len();
5693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5694        } else {
5695            __tmp.len()
5696        }
5697    }
5698}
5699#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5700#[doc = ""]
5701#[doc = "ID: 31"]
5702#[derive(Debug, Clone, PartialEq)]
5703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5705#[cfg_attr(feature = "ts", derive(TS))]
5706#[cfg_attr(feature = "ts", ts(export))]
5707pub struct ATTITUDE_QUATERNION_DATA {
5708    #[doc = "Timestamp (time since system boot)."]
5709    pub time_boot_ms: u32,
5710    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5711    pub q1: f32,
5712    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5713    pub q2: f32,
5714    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5715    pub q3: f32,
5716    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5717    pub q4: f32,
5718    #[doc = "Roll angular speed"]
5719    pub rollspeed: f32,
5720    #[doc = "Pitch angular speed"]
5721    pub pitchspeed: f32,
5722    #[doc = "Yaw angular speed"]
5723    pub yawspeed: f32,
5724    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5725    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5726    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5727    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5728    pub repr_offset_q: [f32; 4],
5729}
5730impl ATTITUDE_QUATERNION_DATA {
5731    pub const ENCODED_LEN: usize = 48usize;
5732    pub const DEFAULT: Self = Self {
5733        time_boot_ms: 0_u32,
5734        q1: 0.0_f32,
5735        q2: 0.0_f32,
5736        q3: 0.0_f32,
5737        q4: 0.0_f32,
5738        rollspeed: 0.0_f32,
5739        pitchspeed: 0.0_f32,
5740        yawspeed: 0.0_f32,
5741        repr_offset_q: [0.0_f32; 4usize],
5742    };
5743    #[cfg(feature = "arbitrary")]
5744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5745        use arbitrary::{Arbitrary, Unstructured};
5746        let mut buf = [0u8; 1024];
5747        rng.fill_bytes(&mut buf);
5748        let mut unstructured = Unstructured::new(&buf);
5749        Self::arbitrary(&mut unstructured).unwrap_or_default()
5750    }
5751}
5752impl Default for ATTITUDE_QUATERNION_DATA {
5753    fn default() -> Self {
5754        Self::DEFAULT.clone()
5755    }
5756}
5757impl MessageData for ATTITUDE_QUATERNION_DATA {
5758    type Message = MavMessage;
5759    const ID: u32 = 31u32;
5760    const NAME: &'static str = "ATTITUDE_QUATERNION";
5761    const EXTRA_CRC: u8 = 246u8;
5762    const ENCODED_LEN: usize = 48usize;
5763    fn deser(
5764        _version: MavlinkVersion,
5765        __input: &[u8],
5766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5767        let avail_len = __input.len();
5768        let mut payload_buf = [0; Self::ENCODED_LEN];
5769        let mut buf = if avail_len < Self::ENCODED_LEN {
5770            payload_buf[0..avail_len].copy_from_slice(__input);
5771            Bytes::new(&payload_buf)
5772        } else {
5773            Bytes::new(__input)
5774        };
5775        let mut __struct = Self::default();
5776        __struct.time_boot_ms = buf.get_u32_le();
5777        __struct.q1 = buf.get_f32_le();
5778        __struct.q2 = buf.get_f32_le();
5779        __struct.q3 = buf.get_f32_le();
5780        __struct.q4 = buf.get_f32_le();
5781        __struct.rollspeed = buf.get_f32_le();
5782        __struct.pitchspeed = buf.get_f32_le();
5783        __struct.yawspeed = buf.get_f32_le();
5784        for v in &mut __struct.repr_offset_q {
5785            let val = buf.get_f32_le();
5786            *v = val;
5787        }
5788        Ok(__struct)
5789    }
5790    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5791        let mut __tmp = BytesMut::new(bytes);
5792        #[allow(clippy::absurd_extreme_comparisons)]
5793        #[allow(unused_comparisons)]
5794        if __tmp.remaining() < Self::ENCODED_LEN {
5795            panic!(
5796                "buffer is too small (need {} bytes, but got {})",
5797                Self::ENCODED_LEN,
5798                __tmp.remaining(),
5799            )
5800        }
5801        __tmp.put_u32_le(self.time_boot_ms);
5802        __tmp.put_f32_le(self.q1);
5803        __tmp.put_f32_le(self.q2);
5804        __tmp.put_f32_le(self.q3);
5805        __tmp.put_f32_le(self.q4);
5806        __tmp.put_f32_le(self.rollspeed);
5807        __tmp.put_f32_le(self.pitchspeed);
5808        __tmp.put_f32_le(self.yawspeed);
5809        if matches!(version, MavlinkVersion::V2) {
5810            for val in &self.repr_offset_q {
5811                __tmp.put_f32_le(*val);
5812            }
5813            let len = __tmp.len();
5814            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5815        } else {
5816            __tmp.len()
5817        }
5818    }
5819}
5820#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5821#[doc = ""]
5822#[doc = "ID: 61"]
5823#[derive(Debug, Clone, PartialEq)]
5824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5826#[cfg_attr(feature = "ts", derive(TS))]
5827#[cfg_attr(feature = "ts", ts(export))]
5828pub struct ATTITUDE_QUATERNION_COV_DATA {
5829    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5830    pub time_usec: u64,
5831    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5832    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5833    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5834    pub q: [f32; 4],
5835    #[doc = "Roll angular speed"]
5836    pub rollspeed: f32,
5837    #[doc = "Pitch angular speed"]
5838    pub pitchspeed: f32,
5839    #[doc = "Yaw angular speed"]
5840    pub yawspeed: f32,
5841    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5842    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5843    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5844    pub covariance: [f32; 9],
5845}
5846impl ATTITUDE_QUATERNION_COV_DATA {
5847    pub const ENCODED_LEN: usize = 72usize;
5848    pub const DEFAULT: Self = Self {
5849        time_usec: 0_u64,
5850        q: [0.0_f32; 4usize],
5851        rollspeed: 0.0_f32,
5852        pitchspeed: 0.0_f32,
5853        yawspeed: 0.0_f32,
5854        covariance: [0.0_f32; 9usize],
5855    };
5856    #[cfg(feature = "arbitrary")]
5857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5858        use arbitrary::{Arbitrary, Unstructured};
5859        let mut buf = [0u8; 1024];
5860        rng.fill_bytes(&mut buf);
5861        let mut unstructured = Unstructured::new(&buf);
5862        Self::arbitrary(&mut unstructured).unwrap_or_default()
5863    }
5864}
5865impl Default for ATTITUDE_QUATERNION_COV_DATA {
5866    fn default() -> Self {
5867        Self::DEFAULT.clone()
5868    }
5869}
5870impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5871    type Message = MavMessage;
5872    const ID: u32 = 61u32;
5873    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5874    const EXTRA_CRC: u8 = 167u8;
5875    const ENCODED_LEN: usize = 72usize;
5876    fn deser(
5877        _version: MavlinkVersion,
5878        __input: &[u8],
5879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5880        let avail_len = __input.len();
5881        let mut payload_buf = [0; Self::ENCODED_LEN];
5882        let mut buf = if avail_len < Self::ENCODED_LEN {
5883            payload_buf[0..avail_len].copy_from_slice(__input);
5884            Bytes::new(&payload_buf)
5885        } else {
5886            Bytes::new(__input)
5887        };
5888        let mut __struct = Self::default();
5889        __struct.time_usec = buf.get_u64_le();
5890        for v in &mut __struct.q {
5891            let val = buf.get_f32_le();
5892            *v = val;
5893        }
5894        __struct.rollspeed = buf.get_f32_le();
5895        __struct.pitchspeed = buf.get_f32_le();
5896        __struct.yawspeed = buf.get_f32_le();
5897        for v in &mut __struct.covariance {
5898            let val = buf.get_f32_le();
5899            *v = val;
5900        }
5901        Ok(__struct)
5902    }
5903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5904        let mut __tmp = BytesMut::new(bytes);
5905        #[allow(clippy::absurd_extreme_comparisons)]
5906        #[allow(unused_comparisons)]
5907        if __tmp.remaining() < Self::ENCODED_LEN {
5908            panic!(
5909                "buffer is too small (need {} bytes, but got {})",
5910                Self::ENCODED_LEN,
5911                __tmp.remaining(),
5912            )
5913        }
5914        __tmp.put_u64_le(self.time_usec);
5915        for val in &self.q {
5916            __tmp.put_f32_le(*val);
5917        }
5918        __tmp.put_f32_le(self.rollspeed);
5919        __tmp.put_f32_le(self.pitchspeed);
5920        __tmp.put_f32_le(self.yawspeed);
5921        for val in &self.covariance {
5922            __tmp.put_f32_le(*val);
5923        }
5924        if matches!(version, MavlinkVersion::V2) {
5925            let len = __tmp.len();
5926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5927        } else {
5928            __tmp.len()
5929        }
5930    }
5931}
5932#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5933#[doc = ""]
5934#[doc = "ID: 83"]
5935#[derive(Debug, Clone, PartialEq)]
5936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5938#[cfg_attr(feature = "ts", derive(TS))]
5939#[cfg_attr(feature = "ts", ts(export))]
5940pub struct ATTITUDE_TARGET_DATA {
5941    #[doc = "Timestamp (time since system boot)."]
5942    pub time_boot_ms: u32,
5943    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5944    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5945    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5946    pub q: [f32; 4],
5947    #[doc = "Body roll rate"]
5948    pub body_roll_rate: f32,
5949    #[doc = "Body pitch rate"]
5950    pub body_pitch_rate: f32,
5951    #[doc = "Body yaw rate"]
5952    pub body_yaw_rate: f32,
5953    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5954    pub thrust: f32,
5955    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5956    pub type_mask: AttitudeTargetTypemask,
5957}
5958impl ATTITUDE_TARGET_DATA {
5959    pub const ENCODED_LEN: usize = 37usize;
5960    pub const DEFAULT: Self = Self {
5961        time_boot_ms: 0_u32,
5962        q: [0.0_f32; 4usize],
5963        body_roll_rate: 0.0_f32,
5964        body_pitch_rate: 0.0_f32,
5965        body_yaw_rate: 0.0_f32,
5966        thrust: 0.0_f32,
5967        type_mask: AttitudeTargetTypemask::DEFAULT,
5968    };
5969    #[cfg(feature = "arbitrary")]
5970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5971        use arbitrary::{Arbitrary, Unstructured};
5972        let mut buf = [0u8; 1024];
5973        rng.fill_bytes(&mut buf);
5974        let mut unstructured = Unstructured::new(&buf);
5975        Self::arbitrary(&mut unstructured).unwrap_or_default()
5976    }
5977}
5978impl Default for ATTITUDE_TARGET_DATA {
5979    fn default() -> Self {
5980        Self::DEFAULT.clone()
5981    }
5982}
5983impl MessageData for ATTITUDE_TARGET_DATA {
5984    type Message = MavMessage;
5985    const ID: u32 = 83u32;
5986    const NAME: &'static str = "ATTITUDE_TARGET";
5987    const EXTRA_CRC: u8 = 22u8;
5988    const ENCODED_LEN: usize = 37usize;
5989    fn deser(
5990        _version: MavlinkVersion,
5991        __input: &[u8],
5992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5993        let avail_len = __input.len();
5994        let mut payload_buf = [0; Self::ENCODED_LEN];
5995        let mut buf = if avail_len < Self::ENCODED_LEN {
5996            payload_buf[0..avail_len].copy_from_slice(__input);
5997            Bytes::new(&payload_buf)
5998        } else {
5999            Bytes::new(__input)
6000        };
6001        let mut __struct = Self::default();
6002        __struct.time_boot_ms = buf.get_u32_le();
6003        for v in &mut __struct.q {
6004            let val = buf.get_f32_le();
6005            *v = val;
6006        }
6007        __struct.body_roll_rate = buf.get_f32_le();
6008        __struct.body_pitch_rate = buf.get_f32_le();
6009        __struct.body_yaw_rate = buf.get_f32_le();
6010        __struct.thrust = buf.get_f32_le();
6011        let tmp = buf.get_u8();
6012        __struct.type_mask = AttitudeTargetTypemask::from_bits(
6013            tmp & AttitudeTargetTypemask::all().bits(),
6014        )
6015        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6016            flag_type: "AttitudeTargetTypemask",
6017            value: tmp as u32,
6018        })?;
6019        Ok(__struct)
6020    }
6021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6022        let mut __tmp = BytesMut::new(bytes);
6023        #[allow(clippy::absurd_extreme_comparisons)]
6024        #[allow(unused_comparisons)]
6025        if __tmp.remaining() < Self::ENCODED_LEN {
6026            panic!(
6027                "buffer is too small (need {} bytes, but got {})",
6028                Self::ENCODED_LEN,
6029                __tmp.remaining(),
6030            )
6031        }
6032        __tmp.put_u32_le(self.time_boot_ms);
6033        for val in &self.q {
6034            __tmp.put_f32_le(*val);
6035        }
6036        __tmp.put_f32_le(self.body_roll_rate);
6037        __tmp.put_f32_le(self.body_pitch_rate);
6038        __tmp.put_f32_le(self.body_yaw_rate);
6039        __tmp.put_f32_le(self.thrust);
6040        __tmp.put_u8(self.type_mask.bits());
6041        if matches!(version, MavlinkVersion::V2) {
6042            let len = __tmp.len();
6043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6044        } else {
6045            __tmp.len()
6046        }
6047    }
6048}
6049#[doc = "Motion capture attitude and position."]
6050#[doc = ""]
6051#[doc = "ID: 138"]
6052#[derive(Debug, Clone, PartialEq)]
6053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6055#[cfg_attr(feature = "ts", derive(TS))]
6056#[cfg_attr(feature = "ts", ts(export))]
6057pub struct ATT_POS_MOCAP_DATA {
6058    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6059    pub time_usec: u64,
6060    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6061    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6062    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6063    pub q: [f32; 4],
6064    #[doc = "X position (NED)"]
6065    pub x: f32,
6066    #[doc = "Y position (NED)"]
6067    pub y: f32,
6068    #[doc = "Z position (NED)"]
6069    pub z: f32,
6070    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6071    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6072    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6073    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6074    pub covariance: [f32; 21],
6075}
6076impl ATT_POS_MOCAP_DATA {
6077    pub const ENCODED_LEN: usize = 120usize;
6078    pub const DEFAULT: Self = Self {
6079        time_usec: 0_u64,
6080        q: [0.0_f32; 4usize],
6081        x: 0.0_f32,
6082        y: 0.0_f32,
6083        z: 0.0_f32,
6084        covariance: [0.0_f32; 21usize],
6085    };
6086    #[cfg(feature = "arbitrary")]
6087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6088        use arbitrary::{Arbitrary, Unstructured};
6089        let mut buf = [0u8; 1024];
6090        rng.fill_bytes(&mut buf);
6091        let mut unstructured = Unstructured::new(&buf);
6092        Self::arbitrary(&mut unstructured).unwrap_or_default()
6093    }
6094}
6095impl Default for ATT_POS_MOCAP_DATA {
6096    fn default() -> Self {
6097        Self::DEFAULT.clone()
6098    }
6099}
6100impl MessageData for ATT_POS_MOCAP_DATA {
6101    type Message = MavMessage;
6102    const ID: u32 = 138u32;
6103    const NAME: &'static str = "ATT_POS_MOCAP";
6104    const EXTRA_CRC: u8 = 109u8;
6105    const ENCODED_LEN: usize = 120usize;
6106    fn deser(
6107        _version: MavlinkVersion,
6108        __input: &[u8],
6109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6110        let avail_len = __input.len();
6111        let mut payload_buf = [0; Self::ENCODED_LEN];
6112        let mut buf = if avail_len < Self::ENCODED_LEN {
6113            payload_buf[0..avail_len].copy_from_slice(__input);
6114            Bytes::new(&payload_buf)
6115        } else {
6116            Bytes::new(__input)
6117        };
6118        let mut __struct = Self::default();
6119        __struct.time_usec = buf.get_u64_le();
6120        for v in &mut __struct.q {
6121            let val = buf.get_f32_le();
6122            *v = val;
6123        }
6124        __struct.x = buf.get_f32_le();
6125        __struct.y = buf.get_f32_le();
6126        __struct.z = buf.get_f32_le();
6127        for v in &mut __struct.covariance {
6128            let val = buf.get_f32_le();
6129            *v = val;
6130        }
6131        Ok(__struct)
6132    }
6133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6134        let mut __tmp = BytesMut::new(bytes);
6135        #[allow(clippy::absurd_extreme_comparisons)]
6136        #[allow(unused_comparisons)]
6137        if __tmp.remaining() < Self::ENCODED_LEN {
6138            panic!(
6139                "buffer is too small (need {} bytes, but got {})",
6140                Self::ENCODED_LEN,
6141                __tmp.remaining(),
6142            )
6143        }
6144        __tmp.put_u64_le(self.time_usec);
6145        for val in &self.q {
6146            __tmp.put_f32_le(*val);
6147        }
6148        __tmp.put_f32_le(self.x);
6149        __tmp.put_f32_le(self.y);
6150        __tmp.put_f32_le(self.z);
6151        if matches!(version, MavlinkVersion::V2) {
6152            for val in &self.covariance {
6153                __tmp.put_f32_le(*val);
6154            }
6155            let len = __tmp.len();
6156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6157        } else {
6158            __tmp.len()
6159        }
6160    }
6161}
6162#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6163#[doc = ""]
6164#[doc = "ID: 7"]
6165#[derive(Debug, Clone, PartialEq)]
6166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6168#[cfg_attr(feature = "ts", derive(TS))]
6169#[cfg_attr(feature = "ts", ts(export))]
6170pub struct AUTH_KEY_DATA {
6171    #[doc = "key"]
6172    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6173    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6174    pub key: [u8; 32],
6175}
6176impl AUTH_KEY_DATA {
6177    pub const ENCODED_LEN: usize = 32usize;
6178    pub const DEFAULT: Self = Self {
6179        key: [0_u8; 32usize],
6180    };
6181    #[cfg(feature = "arbitrary")]
6182    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6183        use arbitrary::{Arbitrary, Unstructured};
6184        let mut buf = [0u8; 1024];
6185        rng.fill_bytes(&mut buf);
6186        let mut unstructured = Unstructured::new(&buf);
6187        Self::arbitrary(&mut unstructured).unwrap_or_default()
6188    }
6189}
6190impl Default for AUTH_KEY_DATA {
6191    fn default() -> Self {
6192        Self::DEFAULT.clone()
6193    }
6194}
6195impl MessageData for AUTH_KEY_DATA {
6196    type Message = MavMessage;
6197    const ID: u32 = 7u32;
6198    const NAME: &'static str = "AUTH_KEY";
6199    const EXTRA_CRC: u8 = 119u8;
6200    const ENCODED_LEN: usize = 32usize;
6201    fn deser(
6202        _version: MavlinkVersion,
6203        __input: &[u8],
6204    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6205        let avail_len = __input.len();
6206        let mut payload_buf = [0; Self::ENCODED_LEN];
6207        let mut buf = if avail_len < Self::ENCODED_LEN {
6208            payload_buf[0..avail_len].copy_from_slice(__input);
6209            Bytes::new(&payload_buf)
6210        } else {
6211            Bytes::new(__input)
6212        };
6213        let mut __struct = Self::default();
6214        for v in &mut __struct.key {
6215            let val = buf.get_u8();
6216            *v = val;
6217        }
6218        Ok(__struct)
6219    }
6220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6221        let mut __tmp = BytesMut::new(bytes);
6222        #[allow(clippy::absurd_extreme_comparisons)]
6223        #[allow(unused_comparisons)]
6224        if __tmp.remaining() < Self::ENCODED_LEN {
6225            panic!(
6226                "buffer is too small (need {} bytes, but got {})",
6227                Self::ENCODED_LEN,
6228                __tmp.remaining(),
6229            )
6230        }
6231        for val in &self.key {
6232            __tmp.put_u8(*val);
6233        }
6234        if matches!(version, MavlinkVersion::V2) {
6235            let len = __tmp.len();
6236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6237        } else {
6238            __tmp.len()
6239        }
6240    }
6241}
6242#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6243#[doc = ""]
6244#[doc = "ID: 286"]
6245#[derive(Debug, Clone, PartialEq)]
6246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6248#[cfg_attr(feature = "ts", derive(TS))]
6249#[cfg_attr(feature = "ts", ts(export))]
6250pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6251    #[doc = "Timestamp (time since system boot)."]
6252    pub time_boot_us: u64,
6253    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6255    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6256    pub q: [f32; 4],
6257    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6258    pub q_estimated_delay_us: u32,
6259    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6260    pub vx: f32,
6261    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6262    pub vy: f32,
6263    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6264    pub vz: f32,
6265    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6266    pub v_estimated_delay_us: u32,
6267    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6268    pub feed_forward_angular_velocity_z: f32,
6269    #[doc = "Bitmap indicating which estimator outputs are valid."]
6270    pub estimator_status: EstimatorStatusFlags,
6271    #[doc = "System ID"]
6272    pub target_system: u8,
6273    #[doc = "Component ID"]
6274    pub target_component: u8,
6275    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6276    pub landed_state: MavLandedState,
6277    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6278    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6279    pub angular_velocity_z: f32,
6280}
6281impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6282    pub const ENCODED_LEN: usize = 57usize;
6283    pub const DEFAULT: Self = Self {
6284        time_boot_us: 0_u64,
6285        q: [0.0_f32; 4usize],
6286        q_estimated_delay_us: 0_u32,
6287        vx: 0.0_f32,
6288        vy: 0.0_f32,
6289        vz: 0.0_f32,
6290        v_estimated_delay_us: 0_u32,
6291        feed_forward_angular_velocity_z: 0.0_f32,
6292        estimator_status: EstimatorStatusFlags::DEFAULT,
6293        target_system: 0_u8,
6294        target_component: 0_u8,
6295        landed_state: MavLandedState::DEFAULT,
6296        angular_velocity_z: 0.0_f32,
6297    };
6298    #[cfg(feature = "arbitrary")]
6299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6300        use arbitrary::{Arbitrary, Unstructured};
6301        let mut buf = [0u8; 1024];
6302        rng.fill_bytes(&mut buf);
6303        let mut unstructured = Unstructured::new(&buf);
6304        Self::arbitrary(&mut unstructured).unwrap_or_default()
6305    }
6306}
6307impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6308    fn default() -> Self {
6309        Self::DEFAULT.clone()
6310    }
6311}
6312impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6313    type Message = MavMessage;
6314    const ID: u32 = 286u32;
6315    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6316    const EXTRA_CRC: u8 = 210u8;
6317    const ENCODED_LEN: usize = 57usize;
6318    fn deser(
6319        _version: MavlinkVersion,
6320        __input: &[u8],
6321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6322        let avail_len = __input.len();
6323        let mut payload_buf = [0; Self::ENCODED_LEN];
6324        let mut buf = if avail_len < Self::ENCODED_LEN {
6325            payload_buf[0..avail_len].copy_from_slice(__input);
6326            Bytes::new(&payload_buf)
6327        } else {
6328            Bytes::new(__input)
6329        };
6330        let mut __struct = Self::default();
6331        __struct.time_boot_us = buf.get_u64_le();
6332        for v in &mut __struct.q {
6333            let val = buf.get_f32_le();
6334            *v = val;
6335        }
6336        __struct.q_estimated_delay_us = buf.get_u32_le();
6337        __struct.vx = buf.get_f32_le();
6338        __struct.vy = buf.get_f32_le();
6339        __struct.vz = buf.get_f32_le();
6340        __struct.v_estimated_delay_us = buf.get_u32_le();
6341        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6342        let tmp = buf.get_u16_le();
6343        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6344            tmp & EstimatorStatusFlags::all().bits(),
6345        )
6346        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6347            flag_type: "EstimatorStatusFlags",
6348            value: tmp as u32,
6349        })?;
6350        __struct.target_system = buf.get_u8();
6351        __struct.target_component = buf.get_u8();
6352        let tmp = buf.get_u8();
6353        __struct.landed_state =
6354            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6355                enum_type: "MavLandedState",
6356                value: tmp as u32,
6357            })?;
6358        __struct.angular_velocity_z = buf.get_f32_le();
6359        Ok(__struct)
6360    }
6361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6362        let mut __tmp = BytesMut::new(bytes);
6363        #[allow(clippy::absurd_extreme_comparisons)]
6364        #[allow(unused_comparisons)]
6365        if __tmp.remaining() < Self::ENCODED_LEN {
6366            panic!(
6367                "buffer is too small (need {} bytes, but got {})",
6368                Self::ENCODED_LEN,
6369                __tmp.remaining(),
6370            )
6371        }
6372        __tmp.put_u64_le(self.time_boot_us);
6373        for val in &self.q {
6374            __tmp.put_f32_le(*val);
6375        }
6376        __tmp.put_u32_le(self.q_estimated_delay_us);
6377        __tmp.put_f32_le(self.vx);
6378        __tmp.put_f32_le(self.vy);
6379        __tmp.put_f32_le(self.vz);
6380        __tmp.put_u32_le(self.v_estimated_delay_us);
6381        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6382        __tmp.put_u16_le(self.estimator_status.bits());
6383        __tmp.put_u8(self.target_system);
6384        __tmp.put_u8(self.target_component);
6385        __tmp.put_u8(self.landed_state as u8);
6386        if matches!(version, MavlinkVersion::V2) {
6387            __tmp.put_f32_le(self.angular_velocity_z);
6388            let len = __tmp.len();
6389            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6390        } else {
6391            __tmp.len()
6392        }
6393    }
6394}
6395#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6396#[doc = ""]
6397#[doc = "ID: 148"]
6398#[derive(Debug, Clone, PartialEq)]
6399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6401#[cfg_attr(feature = "ts", derive(TS))]
6402#[cfg_attr(feature = "ts", ts(export))]
6403pub struct AUTOPILOT_VERSION_DATA {
6404    #[doc = "Bitmap of capabilities"]
6405    pub capabilities: MavProtocolCapability,
6406    #[doc = "UID if provided by hardware (see uid2)"]
6407    pub uid: u64,
6408    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6409    pub flight_sw_version: u32,
6410    #[doc = "Middleware version number"]
6411    pub middleware_sw_version: u32,
6412    #[doc = "Operating system version number"]
6413    pub os_sw_version: u32,
6414    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6415    pub board_version: u32,
6416    #[doc = "ID of the board vendor"]
6417    pub vendor_id: u16,
6418    #[doc = "ID of the product"]
6419    pub product_id: u16,
6420    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6421    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6422    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6423    pub flight_custom_version: [u8; 8],
6424    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6426    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6427    pub middleware_custom_version: [u8; 8],
6428    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6429    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6430    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6431    pub os_custom_version: [u8; 8],
6432    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6434    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6435    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6436    pub uid2: [u8; 18],
6437}
6438impl AUTOPILOT_VERSION_DATA {
6439    pub const ENCODED_LEN: usize = 78usize;
6440    pub const DEFAULT: Self = Self {
6441        capabilities: MavProtocolCapability::DEFAULT,
6442        uid: 0_u64,
6443        flight_sw_version: 0_u32,
6444        middleware_sw_version: 0_u32,
6445        os_sw_version: 0_u32,
6446        board_version: 0_u32,
6447        vendor_id: 0_u16,
6448        product_id: 0_u16,
6449        flight_custom_version: [0_u8; 8usize],
6450        middleware_custom_version: [0_u8; 8usize],
6451        os_custom_version: [0_u8; 8usize],
6452        uid2: [0_u8; 18usize],
6453    };
6454    #[cfg(feature = "arbitrary")]
6455    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6456        use arbitrary::{Arbitrary, Unstructured};
6457        let mut buf = [0u8; 1024];
6458        rng.fill_bytes(&mut buf);
6459        let mut unstructured = Unstructured::new(&buf);
6460        Self::arbitrary(&mut unstructured).unwrap_or_default()
6461    }
6462}
6463impl Default for AUTOPILOT_VERSION_DATA {
6464    fn default() -> Self {
6465        Self::DEFAULT.clone()
6466    }
6467}
6468impl MessageData for AUTOPILOT_VERSION_DATA {
6469    type Message = MavMessage;
6470    const ID: u32 = 148u32;
6471    const NAME: &'static str = "AUTOPILOT_VERSION";
6472    const EXTRA_CRC: u8 = 178u8;
6473    const ENCODED_LEN: usize = 78usize;
6474    fn deser(
6475        _version: MavlinkVersion,
6476        __input: &[u8],
6477    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6478        let avail_len = __input.len();
6479        let mut payload_buf = [0; Self::ENCODED_LEN];
6480        let mut buf = if avail_len < Self::ENCODED_LEN {
6481            payload_buf[0..avail_len].copy_from_slice(__input);
6482            Bytes::new(&payload_buf)
6483        } else {
6484            Bytes::new(__input)
6485        };
6486        let mut __struct = Self::default();
6487        let tmp = buf.get_u64_le();
6488        __struct.capabilities = MavProtocolCapability::from_bits(
6489            tmp & MavProtocolCapability::all().bits(),
6490        )
6491        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6492            flag_type: "MavProtocolCapability",
6493            value: tmp as u32,
6494        })?;
6495        __struct.uid = buf.get_u64_le();
6496        __struct.flight_sw_version = buf.get_u32_le();
6497        __struct.middleware_sw_version = buf.get_u32_le();
6498        __struct.os_sw_version = buf.get_u32_le();
6499        __struct.board_version = buf.get_u32_le();
6500        __struct.vendor_id = buf.get_u16_le();
6501        __struct.product_id = buf.get_u16_le();
6502        for v in &mut __struct.flight_custom_version {
6503            let val = buf.get_u8();
6504            *v = val;
6505        }
6506        for v in &mut __struct.middleware_custom_version {
6507            let val = buf.get_u8();
6508            *v = val;
6509        }
6510        for v in &mut __struct.os_custom_version {
6511            let val = buf.get_u8();
6512            *v = val;
6513        }
6514        for v in &mut __struct.uid2 {
6515            let val = buf.get_u8();
6516            *v = val;
6517        }
6518        Ok(__struct)
6519    }
6520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6521        let mut __tmp = BytesMut::new(bytes);
6522        #[allow(clippy::absurd_extreme_comparisons)]
6523        #[allow(unused_comparisons)]
6524        if __tmp.remaining() < Self::ENCODED_LEN {
6525            panic!(
6526                "buffer is too small (need {} bytes, but got {})",
6527                Self::ENCODED_LEN,
6528                __tmp.remaining(),
6529            )
6530        }
6531        __tmp.put_u64_le(self.capabilities.bits());
6532        __tmp.put_u64_le(self.uid);
6533        __tmp.put_u32_le(self.flight_sw_version);
6534        __tmp.put_u32_le(self.middleware_sw_version);
6535        __tmp.put_u32_le(self.os_sw_version);
6536        __tmp.put_u32_le(self.board_version);
6537        __tmp.put_u16_le(self.vendor_id);
6538        __tmp.put_u16_le(self.product_id);
6539        for val in &self.flight_custom_version {
6540            __tmp.put_u8(*val);
6541        }
6542        for val in &self.middleware_custom_version {
6543            __tmp.put_u8(*val);
6544        }
6545        for val in &self.os_custom_version {
6546            __tmp.put_u8(*val);
6547        }
6548        if matches!(version, MavlinkVersion::V2) {
6549            for val in &self.uid2 {
6550                __tmp.put_u8(*val);
6551            }
6552            let len = __tmp.len();
6553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6554        } else {
6555            __tmp.len()
6556        }
6557    }
6558}
6559#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6560#[doc = ""]
6561#[doc = "ID: 435"]
6562#[derive(Debug, Clone, PartialEq)]
6563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6565#[cfg_attr(feature = "ts", derive(TS))]
6566#[cfg_attr(feature = "ts", ts(export))]
6567pub struct AVAILABLE_MODES_DATA {
6568    #[doc = "A bitfield for use for autopilot-specific flags"]
6569    pub custom_mode: u32,
6570    #[doc = "Mode properties."]
6571    pub properties: MavModeProperty,
6572    #[doc = "The total number of available modes for the current vehicle type."]
6573    pub number_modes: u8,
6574    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6575    pub mode_index: u8,
6576    #[doc = "Standard mode."]
6577    pub standard_mode: MavStandardMode,
6578    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6579    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6580    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6581    pub mode_name: [u8; 35],
6582}
6583impl AVAILABLE_MODES_DATA {
6584    pub const ENCODED_LEN: usize = 46usize;
6585    pub const DEFAULT: Self = Self {
6586        custom_mode: 0_u32,
6587        properties: MavModeProperty::DEFAULT,
6588        number_modes: 0_u8,
6589        mode_index: 0_u8,
6590        standard_mode: MavStandardMode::DEFAULT,
6591        mode_name: [0_u8; 35usize],
6592    };
6593    #[cfg(feature = "arbitrary")]
6594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6595        use arbitrary::{Arbitrary, Unstructured};
6596        let mut buf = [0u8; 1024];
6597        rng.fill_bytes(&mut buf);
6598        let mut unstructured = Unstructured::new(&buf);
6599        Self::arbitrary(&mut unstructured).unwrap_or_default()
6600    }
6601}
6602impl Default for AVAILABLE_MODES_DATA {
6603    fn default() -> Self {
6604        Self::DEFAULT.clone()
6605    }
6606}
6607impl MessageData for AVAILABLE_MODES_DATA {
6608    type Message = MavMessage;
6609    const ID: u32 = 435u32;
6610    const NAME: &'static str = "AVAILABLE_MODES";
6611    const EXTRA_CRC: u8 = 134u8;
6612    const ENCODED_LEN: usize = 46usize;
6613    fn deser(
6614        _version: MavlinkVersion,
6615        __input: &[u8],
6616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6617        let avail_len = __input.len();
6618        let mut payload_buf = [0; Self::ENCODED_LEN];
6619        let mut buf = if avail_len < Self::ENCODED_LEN {
6620            payload_buf[0..avail_len].copy_from_slice(__input);
6621            Bytes::new(&payload_buf)
6622        } else {
6623            Bytes::new(__input)
6624        };
6625        let mut __struct = Self::default();
6626        __struct.custom_mode = buf.get_u32_le();
6627        let tmp = buf.get_u32_le();
6628        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6629            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6630                flag_type: "MavModeProperty",
6631                value: tmp as u32,
6632            })?;
6633        __struct.number_modes = buf.get_u8();
6634        __struct.mode_index = buf.get_u8();
6635        let tmp = buf.get_u8();
6636        __struct.standard_mode =
6637            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6638                enum_type: "MavStandardMode",
6639                value: tmp as u32,
6640            })?;
6641        for v in &mut __struct.mode_name {
6642            let val = buf.get_u8();
6643            *v = val;
6644        }
6645        Ok(__struct)
6646    }
6647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6648        let mut __tmp = BytesMut::new(bytes);
6649        #[allow(clippy::absurd_extreme_comparisons)]
6650        #[allow(unused_comparisons)]
6651        if __tmp.remaining() < Self::ENCODED_LEN {
6652            panic!(
6653                "buffer is too small (need {} bytes, but got {})",
6654                Self::ENCODED_LEN,
6655                __tmp.remaining(),
6656            )
6657        }
6658        __tmp.put_u32_le(self.custom_mode);
6659        __tmp.put_u32_le(self.properties.bits());
6660        __tmp.put_u8(self.number_modes);
6661        __tmp.put_u8(self.mode_index);
6662        __tmp.put_u8(self.standard_mode as u8);
6663        for val in &self.mode_name {
6664            __tmp.put_u8(*val);
6665        }
6666        if matches!(version, MavlinkVersion::V2) {
6667            let len = __tmp.len();
6668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6669        } else {
6670            __tmp.len()
6671        }
6672    }
6673}
6674#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6675#[doc = ""]
6676#[doc = "ID: 437"]
6677#[derive(Debug, Clone, PartialEq)]
6678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6680#[cfg_attr(feature = "ts", derive(TS))]
6681#[cfg_attr(feature = "ts", ts(export))]
6682pub struct AVAILABLE_MODES_MONITOR_DATA {
6683    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6684    pub seq: u8,
6685}
6686impl AVAILABLE_MODES_MONITOR_DATA {
6687    pub const ENCODED_LEN: usize = 1usize;
6688    pub const DEFAULT: Self = Self { seq: 0_u8 };
6689    #[cfg(feature = "arbitrary")]
6690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6691        use arbitrary::{Arbitrary, Unstructured};
6692        let mut buf = [0u8; 1024];
6693        rng.fill_bytes(&mut buf);
6694        let mut unstructured = Unstructured::new(&buf);
6695        Self::arbitrary(&mut unstructured).unwrap_or_default()
6696    }
6697}
6698impl Default for AVAILABLE_MODES_MONITOR_DATA {
6699    fn default() -> Self {
6700        Self::DEFAULT.clone()
6701    }
6702}
6703impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6704    type Message = MavMessage;
6705    const ID: u32 = 437u32;
6706    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6707    const EXTRA_CRC: u8 = 30u8;
6708    const ENCODED_LEN: usize = 1usize;
6709    fn deser(
6710        _version: MavlinkVersion,
6711        __input: &[u8],
6712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6713        let avail_len = __input.len();
6714        let mut payload_buf = [0; Self::ENCODED_LEN];
6715        let mut buf = if avail_len < Self::ENCODED_LEN {
6716            payload_buf[0..avail_len].copy_from_slice(__input);
6717            Bytes::new(&payload_buf)
6718        } else {
6719            Bytes::new(__input)
6720        };
6721        let mut __struct = Self::default();
6722        __struct.seq = buf.get_u8();
6723        Ok(__struct)
6724    }
6725    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6726        let mut __tmp = BytesMut::new(bytes);
6727        #[allow(clippy::absurd_extreme_comparisons)]
6728        #[allow(unused_comparisons)]
6729        if __tmp.remaining() < Self::ENCODED_LEN {
6730            panic!(
6731                "buffer is too small (need {} bytes, but got {})",
6732                Self::ENCODED_LEN,
6733                __tmp.remaining(),
6734            )
6735        }
6736        __tmp.put_u8(self.seq);
6737        if matches!(version, MavlinkVersion::V2) {
6738            let len = __tmp.len();
6739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6740        } else {
6741            __tmp.len()
6742        }
6743    }
6744}
6745#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6746#[doc = ""]
6747#[doc = "ID: 372"]
6748#[derive(Debug, Clone, PartialEq)]
6749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6751#[cfg_attr(feature = "ts", derive(TS))]
6752#[cfg_attr(feature = "ts", ts(export))]
6753pub struct BATTERY_INFO_DATA {
6754    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6755    pub discharge_minimum_voltage: f32,
6756    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6757    pub charging_minimum_voltage: f32,
6758    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6759    pub resting_minimum_voltage: f32,
6760    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6761    pub charging_maximum_voltage: f32,
6762    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6763    pub charging_maximum_current: f32,
6764    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6765    pub nominal_voltage: f32,
6766    #[doc = "Maximum pack discharge current. 0: field not provided."]
6767    pub discharge_maximum_current: f32,
6768    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6769    pub discharge_maximum_burst_current: f32,
6770    #[doc = "Fully charged design capacity. 0: field not provided."]
6771    pub design_capacity: f32,
6772    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6773    pub full_charge_capacity: f32,
6774    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6775    pub cycle_count: u16,
6776    #[doc = "Battery weight. 0: field not provided."]
6777    pub weight: u16,
6778    #[doc = "Battery ID"]
6779    pub id: u8,
6780    #[doc = "Function of the battery."]
6781    pub battery_function: MavBatteryFunction,
6782    #[doc = "Type (chemistry) of the battery."]
6783    pub mavtype: MavBatteryType,
6784    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6785    pub state_of_health: u8,
6786    #[doc = "Number of battery cells in series. 0: field not provided."]
6787    pub cells_in_series: u8,
6788    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6790    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6791    pub manufacture_date: [u8; 9],
6792    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6793    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6794    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6795    pub serial_number: [u8; 32],
6796    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6798    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6799    pub name: [u8; 50],
6800}
6801impl BATTERY_INFO_DATA {
6802    pub const ENCODED_LEN: usize = 140usize;
6803    pub const DEFAULT: Self = Self {
6804        discharge_minimum_voltage: 0.0_f32,
6805        charging_minimum_voltage: 0.0_f32,
6806        resting_minimum_voltage: 0.0_f32,
6807        charging_maximum_voltage: 0.0_f32,
6808        charging_maximum_current: 0.0_f32,
6809        nominal_voltage: 0.0_f32,
6810        discharge_maximum_current: 0.0_f32,
6811        discharge_maximum_burst_current: 0.0_f32,
6812        design_capacity: 0.0_f32,
6813        full_charge_capacity: 0.0_f32,
6814        cycle_count: 0_u16,
6815        weight: 0_u16,
6816        id: 0_u8,
6817        battery_function: MavBatteryFunction::DEFAULT,
6818        mavtype: MavBatteryType::DEFAULT,
6819        state_of_health: 0_u8,
6820        cells_in_series: 0_u8,
6821        manufacture_date: [0_u8; 9usize],
6822        serial_number: [0_u8; 32usize],
6823        name: [0_u8; 50usize],
6824    };
6825    #[cfg(feature = "arbitrary")]
6826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6827        use arbitrary::{Arbitrary, Unstructured};
6828        let mut buf = [0u8; 1024];
6829        rng.fill_bytes(&mut buf);
6830        let mut unstructured = Unstructured::new(&buf);
6831        Self::arbitrary(&mut unstructured).unwrap_or_default()
6832    }
6833}
6834impl Default for BATTERY_INFO_DATA {
6835    fn default() -> Self {
6836        Self::DEFAULT.clone()
6837    }
6838}
6839impl MessageData for BATTERY_INFO_DATA {
6840    type Message = MavMessage;
6841    const ID: u32 = 372u32;
6842    const NAME: &'static str = "BATTERY_INFO";
6843    const EXTRA_CRC: u8 = 26u8;
6844    const ENCODED_LEN: usize = 140usize;
6845    fn deser(
6846        _version: MavlinkVersion,
6847        __input: &[u8],
6848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6849        let avail_len = __input.len();
6850        let mut payload_buf = [0; Self::ENCODED_LEN];
6851        let mut buf = if avail_len < Self::ENCODED_LEN {
6852            payload_buf[0..avail_len].copy_from_slice(__input);
6853            Bytes::new(&payload_buf)
6854        } else {
6855            Bytes::new(__input)
6856        };
6857        let mut __struct = Self::default();
6858        __struct.discharge_minimum_voltage = buf.get_f32_le();
6859        __struct.charging_minimum_voltage = buf.get_f32_le();
6860        __struct.resting_minimum_voltage = buf.get_f32_le();
6861        __struct.charging_maximum_voltage = buf.get_f32_le();
6862        __struct.charging_maximum_current = buf.get_f32_le();
6863        __struct.nominal_voltage = buf.get_f32_le();
6864        __struct.discharge_maximum_current = buf.get_f32_le();
6865        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6866        __struct.design_capacity = buf.get_f32_le();
6867        __struct.full_charge_capacity = buf.get_f32_le();
6868        __struct.cycle_count = buf.get_u16_le();
6869        __struct.weight = buf.get_u16_le();
6870        __struct.id = buf.get_u8();
6871        let tmp = buf.get_u8();
6872        __struct.battery_function =
6873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6874                enum_type: "MavBatteryFunction",
6875                value: tmp as u32,
6876            })?;
6877        let tmp = buf.get_u8();
6878        __struct.mavtype =
6879            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6880                enum_type: "MavBatteryType",
6881                value: tmp as u32,
6882            })?;
6883        __struct.state_of_health = buf.get_u8();
6884        __struct.cells_in_series = buf.get_u8();
6885        for v in &mut __struct.manufacture_date {
6886            let val = buf.get_u8();
6887            *v = val;
6888        }
6889        for v in &mut __struct.serial_number {
6890            let val = buf.get_u8();
6891            *v = val;
6892        }
6893        for v in &mut __struct.name {
6894            let val = buf.get_u8();
6895            *v = val;
6896        }
6897        Ok(__struct)
6898    }
6899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6900        let mut __tmp = BytesMut::new(bytes);
6901        #[allow(clippy::absurd_extreme_comparisons)]
6902        #[allow(unused_comparisons)]
6903        if __tmp.remaining() < Self::ENCODED_LEN {
6904            panic!(
6905                "buffer is too small (need {} bytes, but got {})",
6906                Self::ENCODED_LEN,
6907                __tmp.remaining(),
6908            )
6909        }
6910        __tmp.put_f32_le(self.discharge_minimum_voltage);
6911        __tmp.put_f32_le(self.charging_minimum_voltage);
6912        __tmp.put_f32_le(self.resting_minimum_voltage);
6913        __tmp.put_f32_le(self.charging_maximum_voltage);
6914        __tmp.put_f32_le(self.charging_maximum_current);
6915        __tmp.put_f32_le(self.nominal_voltage);
6916        __tmp.put_f32_le(self.discharge_maximum_current);
6917        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6918        __tmp.put_f32_le(self.design_capacity);
6919        __tmp.put_f32_le(self.full_charge_capacity);
6920        __tmp.put_u16_le(self.cycle_count);
6921        __tmp.put_u16_le(self.weight);
6922        __tmp.put_u8(self.id);
6923        __tmp.put_u8(self.battery_function as u8);
6924        __tmp.put_u8(self.mavtype as u8);
6925        __tmp.put_u8(self.state_of_health);
6926        __tmp.put_u8(self.cells_in_series);
6927        for val in &self.manufacture_date {
6928            __tmp.put_u8(*val);
6929        }
6930        for val in &self.serial_number {
6931            __tmp.put_u8(*val);
6932        }
6933        for val in &self.name {
6934            __tmp.put_u8(*val);
6935        }
6936        if matches!(version, MavlinkVersion::V2) {
6937            let len = __tmp.len();
6938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6939        } else {
6940            __tmp.len()
6941        }
6942    }
6943}
6944#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6945#[doc = ""]
6946#[doc = "ID: 147"]
6947#[derive(Debug, Clone, PartialEq)]
6948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6950#[cfg_attr(feature = "ts", derive(TS))]
6951#[cfg_attr(feature = "ts", ts(export))]
6952pub struct BATTERY_STATUS_DATA {
6953    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6954    pub current_consumed: i32,
6955    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6956    pub energy_consumed: i32,
6957    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6958    pub temperature: i16,
6959    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6961    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6962    pub voltages: [u16; 10],
6963    #[doc = "Battery current, -1: autopilot does not measure the current"]
6964    pub current_battery: i16,
6965    #[doc = "Battery ID"]
6966    pub id: u8,
6967    #[doc = "Function of the battery"]
6968    pub battery_function: MavBatteryFunction,
6969    #[doc = "Type (chemistry) of the battery"]
6970    pub mavtype: MavBatteryType,
6971    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6972    pub battery_remaining: i8,
6973    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6974    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6975    pub time_remaining: i32,
6976    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6977    #[cfg_attr(feature = "serde", serde(default))]
6978    pub charge_state: MavBatteryChargeState,
6979    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6982    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6983    pub voltages_ext: [u16; 4],
6984    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6985    #[cfg_attr(feature = "serde", serde(default))]
6986    pub mode: MavBatteryMode,
6987    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6988    #[cfg_attr(feature = "serde", serde(default))]
6989    pub fault_bitmask: MavBatteryFault,
6990}
6991impl BATTERY_STATUS_DATA {
6992    pub const ENCODED_LEN: usize = 54usize;
6993    pub const DEFAULT: Self = Self {
6994        current_consumed: 0_i32,
6995        energy_consumed: 0_i32,
6996        temperature: 0_i16,
6997        voltages: [0_u16; 10usize],
6998        current_battery: 0_i16,
6999        id: 0_u8,
7000        battery_function: MavBatteryFunction::DEFAULT,
7001        mavtype: MavBatteryType::DEFAULT,
7002        battery_remaining: 0_i8,
7003        time_remaining: 0_i32,
7004        charge_state: MavBatteryChargeState::DEFAULT,
7005        voltages_ext: [0_u16; 4usize],
7006        mode: MavBatteryMode::DEFAULT,
7007        fault_bitmask: MavBatteryFault::DEFAULT,
7008    };
7009    #[cfg(feature = "arbitrary")]
7010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7011        use arbitrary::{Arbitrary, Unstructured};
7012        let mut buf = [0u8; 1024];
7013        rng.fill_bytes(&mut buf);
7014        let mut unstructured = Unstructured::new(&buf);
7015        Self::arbitrary(&mut unstructured).unwrap_or_default()
7016    }
7017}
7018impl Default for BATTERY_STATUS_DATA {
7019    fn default() -> Self {
7020        Self::DEFAULT.clone()
7021    }
7022}
7023impl MessageData for BATTERY_STATUS_DATA {
7024    type Message = MavMessage;
7025    const ID: u32 = 147u32;
7026    const NAME: &'static str = "BATTERY_STATUS";
7027    const EXTRA_CRC: u8 = 154u8;
7028    const ENCODED_LEN: usize = 54usize;
7029    fn deser(
7030        _version: MavlinkVersion,
7031        __input: &[u8],
7032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7033        let avail_len = __input.len();
7034        let mut payload_buf = [0; Self::ENCODED_LEN];
7035        let mut buf = if avail_len < Self::ENCODED_LEN {
7036            payload_buf[0..avail_len].copy_from_slice(__input);
7037            Bytes::new(&payload_buf)
7038        } else {
7039            Bytes::new(__input)
7040        };
7041        let mut __struct = Self::default();
7042        __struct.current_consumed = buf.get_i32_le();
7043        __struct.energy_consumed = buf.get_i32_le();
7044        __struct.temperature = buf.get_i16_le();
7045        for v in &mut __struct.voltages {
7046            let val = buf.get_u16_le();
7047            *v = val;
7048        }
7049        __struct.current_battery = buf.get_i16_le();
7050        __struct.id = buf.get_u8();
7051        let tmp = buf.get_u8();
7052        __struct.battery_function =
7053            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7054                enum_type: "MavBatteryFunction",
7055                value: tmp as u32,
7056            })?;
7057        let tmp = buf.get_u8();
7058        __struct.mavtype =
7059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7060                enum_type: "MavBatteryType",
7061                value: tmp as u32,
7062            })?;
7063        __struct.battery_remaining = buf.get_i8();
7064        __struct.time_remaining = buf.get_i32_le();
7065        let tmp = buf.get_u8();
7066        __struct.charge_state =
7067            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7068                enum_type: "MavBatteryChargeState",
7069                value: tmp as u32,
7070            })?;
7071        for v in &mut __struct.voltages_ext {
7072            let val = buf.get_u16_le();
7073            *v = val;
7074        }
7075        let tmp = buf.get_u8();
7076        __struct.mode =
7077            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7078                enum_type: "MavBatteryMode",
7079                value: tmp as u32,
7080            })?;
7081        let tmp = buf.get_u32_le();
7082        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
7083            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7084                flag_type: "MavBatteryFault",
7085                value: tmp as u32,
7086            })?;
7087        Ok(__struct)
7088    }
7089    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7090        let mut __tmp = BytesMut::new(bytes);
7091        #[allow(clippy::absurd_extreme_comparisons)]
7092        #[allow(unused_comparisons)]
7093        if __tmp.remaining() < Self::ENCODED_LEN {
7094            panic!(
7095                "buffer is too small (need {} bytes, but got {})",
7096                Self::ENCODED_LEN,
7097                __tmp.remaining(),
7098            )
7099        }
7100        __tmp.put_i32_le(self.current_consumed);
7101        __tmp.put_i32_le(self.energy_consumed);
7102        __tmp.put_i16_le(self.temperature);
7103        for val in &self.voltages {
7104            __tmp.put_u16_le(*val);
7105        }
7106        __tmp.put_i16_le(self.current_battery);
7107        __tmp.put_u8(self.id);
7108        __tmp.put_u8(self.battery_function as u8);
7109        __tmp.put_u8(self.mavtype as u8);
7110        __tmp.put_i8(self.battery_remaining);
7111        if matches!(version, MavlinkVersion::V2) {
7112            __tmp.put_i32_le(self.time_remaining);
7113            __tmp.put_u8(self.charge_state as u8);
7114            for val in &self.voltages_ext {
7115                __tmp.put_u16_le(*val);
7116            }
7117            __tmp.put_u8(self.mode as u8);
7118            __tmp.put_u32_le(self.fault_bitmask.bits());
7119            let len = __tmp.len();
7120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7121        } else {
7122            __tmp.len()
7123        }
7124    }
7125}
7126#[doc = "Battery dynamic information.         This should be streamed (nominally at 1Hz).         Static/invariant battery information is sent in BATTERY_INFO.         Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full.         Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on."]
7127#[doc = ""]
7128#[doc = "ID: 369"]
7129#[derive(Debug, Clone, PartialEq)]
7130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7132#[cfg_attr(feature = "ts", derive(TS))]
7133#[cfg_attr(feature = "ts", ts(export))]
7134pub struct BATTERY_STATUS_V2_DATA {
7135    #[doc = "Battery voltage (total). NaN: field not provided."]
7136    pub voltage: f32,
7137    #[doc = "Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided."]
7138    pub current: f32,
7139    #[doc = "Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL."]
7140    pub capacity_consumed: f32,
7141    #[doc = "Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered."]
7142    pub capacity_remaining: f32,
7143    #[doc = "Fault, health, readiness, and other status indications."]
7144    pub status_flags: MavBatteryStatusFlags,
7145    #[doc = "Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided."]
7146    pub temperature: i16,
7147    #[doc = "Battery ID"]
7148    pub id: u8,
7149    #[doc = "Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided."]
7150    pub percent_remaining: u8,
7151}
7152impl BATTERY_STATUS_V2_DATA {
7153    pub const ENCODED_LEN: usize = 24usize;
7154    pub const DEFAULT: Self = Self {
7155        voltage: 0.0_f32,
7156        current: 0.0_f32,
7157        capacity_consumed: 0.0_f32,
7158        capacity_remaining: 0.0_f32,
7159        status_flags: MavBatteryStatusFlags::DEFAULT,
7160        temperature: 0_i16,
7161        id: 0_u8,
7162        percent_remaining: 0_u8,
7163    };
7164    #[cfg(feature = "arbitrary")]
7165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7166        use arbitrary::{Arbitrary, Unstructured};
7167        let mut buf = [0u8; 1024];
7168        rng.fill_bytes(&mut buf);
7169        let mut unstructured = Unstructured::new(&buf);
7170        Self::arbitrary(&mut unstructured).unwrap_or_default()
7171    }
7172}
7173impl Default for BATTERY_STATUS_V2_DATA {
7174    fn default() -> Self {
7175        Self::DEFAULT.clone()
7176    }
7177}
7178impl MessageData for BATTERY_STATUS_V2_DATA {
7179    type Message = MavMessage;
7180    const ID: u32 = 369u32;
7181    const NAME: &'static str = "BATTERY_STATUS_V2";
7182    const EXTRA_CRC: u8 = 151u8;
7183    const ENCODED_LEN: usize = 24usize;
7184    fn deser(
7185        _version: MavlinkVersion,
7186        __input: &[u8],
7187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7188        let avail_len = __input.len();
7189        let mut payload_buf = [0; Self::ENCODED_LEN];
7190        let mut buf = if avail_len < Self::ENCODED_LEN {
7191            payload_buf[0..avail_len].copy_from_slice(__input);
7192            Bytes::new(&payload_buf)
7193        } else {
7194            Bytes::new(__input)
7195        };
7196        let mut __struct = Self::default();
7197        __struct.voltage = buf.get_f32_le();
7198        __struct.current = buf.get_f32_le();
7199        __struct.capacity_consumed = buf.get_f32_le();
7200        __struct.capacity_remaining = buf.get_f32_le();
7201        let tmp = buf.get_u32_le();
7202        __struct.status_flags = MavBatteryStatusFlags::from_bits(
7203            tmp & MavBatteryStatusFlags::all().bits(),
7204        )
7205        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7206            flag_type: "MavBatteryStatusFlags",
7207            value: tmp as u32,
7208        })?;
7209        __struct.temperature = buf.get_i16_le();
7210        __struct.id = buf.get_u8();
7211        __struct.percent_remaining = buf.get_u8();
7212        Ok(__struct)
7213    }
7214    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7215        let mut __tmp = BytesMut::new(bytes);
7216        #[allow(clippy::absurd_extreme_comparisons)]
7217        #[allow(unused_comparisons)]
7218        if __tmp.remaining() < Self::ENCODED_LEN {
7219            panic!(
7220                "buffer is too small (need {} bytes, but got {})",
7221                Self::ENCODED_LEN,
7222                __tmp.remaining(),
7223            )
7224        }
7225        __tmp.put_f32_le(self.voltage);
7226        __tmp.put_f32_le(self.current);
7227        __tmp.put_f32_le(self.capacity_consumed);
7228        __tmp.put_f32_le(self.capacity_remaining);
7229        __tmp.put_u32_le(self.status_flags.bits());
7230        __tmp.put_i16_le(self.temperature);
7231        __tmp.put_u8(self.id);
7232        __tmp.put_u8(self.percent_remaining);
7233        if matches!(version, MavlinkVersion::V2) {
7234            let len = __tmp.len();
7235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7236        } else {
7237            __tmp.len()
7238        }
7239    }
7240}
7241#[doc = "Report button state change."]
7242#[doc = ""]
7243#[doc = "ID: 257"]
7244#[derive(Debug, Clone, PartialEq)]
7245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7247#[cfg_attr(feature = "ts", derive(TS))]
7248#[cfg_attr(feature = "ts", ts(export))]
7249pub struct BUTTON_CHANGE_DATA {
7250    #[doc = "Timestamp (time since system boot)."]
7251    pub time_boot_ms: u32,
7252    #[doc = "Time of last change of button state."]
7253    pub last_change_ms: u32,
7254    #[doc = "Bitmap for state of buttons."]
7255    pub state: u8,
7256}
7257impl BUTTON_CHANGE_DATA {
7258    pub const ENCODED_LEN: usize = 9usize;
7259    pub const DEFAULT: Self = Self {
7260        time_boot_ms: 0_u32,
7261        last_change_ms: 0_u32,
7262        state: 0_u8,
7263    };
7264    #[cfg(feature = "arbitrary")]
7265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7266        use arbitrary::{Arbitrary, Unstructured};
7267        let mut buf = [0u8; 1024];
7268        rng.fill_bytes(&mut buf);
7269        let mut unstructured = Unstructured::new(&buf);
7270        Self::arbitrary(&mut unstructured).unwrap_or_default()
7271    }
7272}
7273impl Default for BUTTON_CHANGE_DATA {
7274    fn default() -> Self {
7275        Self::DEFAULT.clone()
7276    }
7277}
7278impl MessageData for BUTTON_CHANGE_DATA {
7279    type Message = MavMessage;
7280    const ID: u32 = 257u32;
7281    const NAME: &'static str = "BUTTON_CHANGE";
7282    const EXTRA_CRC: u8 = 131u8;
7283    const ENCODED_LEN: usize = 9usize;
7284    fn deser(
7285        _version: MavlinkVersion,
7286        __input: &[u8],
7287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7288        let avail_len = __input.len();
7289        let mut payload_buf = [0; Self::ENCODED_LEN];
7290        let mut buf = if avail_len < Self::ENCODED_LEN {
7291            payload_buf[0..avail_len].copy_from_slice(__input);
7292            Bytes::new(&payload_buf)
7293        } else {
7294            Bytes::new(__input)
7295        };
7296        let mut __struct = Self::default();
7297        __struct.time_boot_ms = buf.get_u32_le();
7298        __struct.last_change_ms = buf.get_u32_le();
7299        __struct.state = buf.get_u8();
7300        Ok(__struct)
7301    }
7302    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7303        let mut __tmp = BytesMut::new(bytes);
7304        #[allow(clippy::absurd_extreme_comparisons)]
7305        #[allow(unused_comparisons)]
7306        if __tmp.remaining() < Self::ENCODED_LEN {
7307            panic!(
7308                "buffer is too small (need {} bytes, but got {})",
7309                Self::ENCODED_LEN,
7310                __tmp.remaining(),
7311            )
7312        }
7313        __tmp.put_u32_le(self.time_boot_ms);
7314        __tmp.put_u32_le(self.last_change_ms);
7315        __tmp.put_u8(self.state);
7316        if matches!(version, MavlinkVersion::V2) {
7317            let len = __tmp.len();
7318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7319        } else {
7320            __tmp.len()
7321        }
7322    }
7323}
7324#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7325#[doc = ""]
7326#[doc = "ID: 262"]
7327#[derive(Debug, Clone, PartialEq)]
7328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7330#[cfg_attr(feature = "ts", derive(TS))]
7331#[cfg_attr(feature = "ts", ts(export))]
7332pub struct CAMERA_CAPTURE_STATUS_DATA {
7333    #[doc = "Timestamp (time since system boot)."]
7334    pub time_boot_ms: u32,
7335    #[doc = "Image capture interval"]
7336    pub image_interval: f32,
7337    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7338    pub recording_time_ms: u32,
7339    #[doc = "Available storage capacity."]
7340    pub available_capacity: f32,
7341    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7342    pub image_status: u8,
7343    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7344    pub video_status: u8,
7345    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7347    pub image_count: i32,
7348    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7349    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7350    pub camera_device_id: u8,
7351}
7352impl CAMERA_CAPTURE_STATUS_DATA {
7353    pub const ENCODED_LEN: usize = 23usize;
7354    pub const DEFAULT: Self = Self {
7355        time_boot_ms: 0_u32,
7356        image_interval: 0.0_f32,
7357        recording_time_ms: 0_u32,
7358        available_capacity: 0.0_f32,
7359        image_status: 0_u8,
7360        video_status: 0_u8,
7361        image_count: 0_i32,
7362        camera_device_id: 0_u8,
7363    };
7364    #[cfg(feature = "arbitrary")]
7365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7366        use arbitrary::{Arbitrary, Unstructured};
7367        let mut buf = [0u8; 1024];
7368        rng.fill_bytes(&mut buf);
7369        let mut unstructured = Unstructured::new(&buf);
7370        Self::arbitrary(&mut unstructured).unwrap_or_default()
7371    }
7372}
7373impl Default for CAMERA_CAPTURE_STATUS_DATA {
7374    fn default() -> Self {
7375        Self::DEFAULT.clone()
7376    }
7377}
7378impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7379    type Message = MavMessage;
7380    const ID: u32 = 262u32;
7381    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7382    const EXTRA_CRC: u8 = 12u8;
7383    const ENCODED_LEN: usize = 23usize;
7384    fn deser(
7385        _version: MavlinkVersion,
7386        __input: &[u8],
7387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7388        let avail_len = __input.len();
7389        let mut payload_buf = [0; Self::ENCODED_LEN];
7390        let mut buf = if avail_len < Self::ENCODED_LEN {
7391            payload_buf[0..avail_len].copy_from_slice(__input);
7392            Bytes::new(&payload_buf)
7393        } else {
7394            Bytes::new(__input)
7395        };
7396        let mut __struct = Self::default();
7397        __struct.time_boot_ms = buf.get_u32_le();
7398        __struct.image_interval = buf.get_f32_le();
7399        __struct.recording_time_ms = buf.get_u32_le();
7400        __struct.available_capacity = buf.get_f32_le();
7401        __struct.image_status = buf.get_u8();
7402        __struct.video_status = buf.get_u8();
7403        __struct.image_count = buf.get_i32_le();
7404        __struct.camera_device_id = buf.get_u8();
7405        Ok(__struct)
7406    }
7407    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7408        let mut __tmp = BytesMut::new(bytes);
7409        #[allow(clippy::absurd_extreme_comparisons)]
7410        #[allow(unused_comparisons)]
7411        if __tmp.remaining() < Self::ENCODED_LEN {
7412            panic!(
7413                "buffer is too small (need {} bytes, but got {})",
7414                Self::ENCODED_LEN,
7415                __tmp.remaining(),
7416            )
7417        }
7418        __tmp.put_u32_le(self.time_boot_ms);
7419        __tmp.put_f32_le(self.image_interval);
7420        __tmp.put_u32_le(self.recording_time_ms);
7421        __tmp.put_f32_le(self.available_capacity);
7422        __tmp.put_u8(self.image_status);
7423        __tmp.put_u8(self.video_status);
7424        if matches!(version, MavlinkVersion::V2) {
7425            __tmp.put_i32_le(self.image_count);
7426            __tmp.put_u8(self.camera_device_id);
7427            let len = __tmp.len();
7428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7429        } else {
7430            __tmp.len()
7431        }
7432    }
7433}
7434#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7435#[doc = ""]
7436#[doc = "ID: 271"]
7437#[derive(Debug, Clone, PartialEq)]
7438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7440#[cfg_attr(feature = "ts", derive(TS))]
7441#[cfg_attr(feature = "ts", ts(export))]
7442pub struct CAMERA_FOV_STATUS_DATA {
7443    #[doc = "Timestamp (time since system boot)."]
7444    pub time_boot_ms: u32,
7445    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7446    pub lat_camera: i32,
7447    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7448    pub lon_camera: i32,
7449    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7450    pub alt_camera: i32,
7451    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7452    pub lat_image: i32,
7453    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7454    pub lon_image: i32,
7455    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7456    pub alt_image: i32,
7457    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7458    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7459    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7460    pub q: [f32; 4],
7461    #[doc = "Horizontal field of view (NaN if unknown)."]
7462    pub hfov: f32,
7463    #[doc = "Vertical field of view (NaN if unknown)."]
7464    pub vfov: f32,
7465    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7466    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7467    pub camera_device_id: u8,
7468}
7469impl CAMERA_FOV_STATUS_DATA {
7470    pub const ENCODED_LEN: usize = 53usize;
7471    pub const DEFAULT: Self = Self {
7472        time_boot_ms: 0_u32,
7473        lat_camera: 0_i32,
7474        lon_camera: 0_i32,
7475        alt_camera: 0_i32,
7476        lat_image: 0_i32,
7477        lon_image: 0_i32,
7478        alt_image: 0_i32,
7479        q: [0.0_f32; 4usize],
7480        hfov: 0.0_f32,
7481        vfov: 0.0_f32,
7482        camera_device_id: 0_u8,
7483    };
7484    #[cfg(feature = "arbitrary")]
7485    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7486        use arbitrary::{Arbitrary, Unstructured};
7487        let mut buf = [0u8; 1024];
7488        rng.fill_bytes(&mut buf);
7489        let mut unstructured = Unstructured::new(&buf);
7490        Self::arbitrary(&mut unstructured).unwrap_or_default()
7491    }
7492}
7493impl Default for CAMERA_FOV_STATUS_DATA {
7494    fn default() -> Self {
7495        Self::DEFAULT.clone()
7496    }
7497}
7498impl MessageData for CAMERA_FOV_STATUS_DATA {
7499    type Message = MavMessage;
7500    const ID: u32 = 271u32;
7501    const NAME: &'static str = "CAMERA_FOV_STATUS";
7502    const EXTRA_CRC: u8 = 22u8;
7503    const ENCODED_LEN: usize = 53usize;
7504    fn deser(
7505        _version: MavlinkVersion,
7506        __input: &[u8],
7507    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7508        let avail_len = __input.len();
7509        let mut payload_buf = [0; Self::ENCODED_LEN];
7510        let mut buf = if avail_len < Self::ENCODED_LEN {
7511            payload_buf[0..avail_len].copy_from_slice(__input);
7512            Bytes::new(&payload_buf)
7513        } else {
7514            Bytes::new(__input)
7515        };
7516        let mut __struct = Self::default();
7517        __struct.time_boot_ms = buf.get_u32_le();
7518        __struct.lat_camera = buf.get_i32_le();
7519        __struct.lon_camera = buf.get_i32_le();
7520        __struct.alt_camera = buf.get_i32_le();
7521        __struct.lat_image = buf.get_i32_le();
7522        __struct.lon_image = buf.get_i32_le();
7523        __struct.alt_image = buf.get_i32_le();
7524        for v in &mut __struct.q {
7525            let val = buf.get_f32_le();
7526            *v = val;
7527        }
7528        __struct.hfov = buf.get_f32_le();
7529        __struct.vfov = buf.get_f32_le();
7530        __struct.camera_device_id = buf.get_u8();
7531        Ok(__struct)
7532    }
7533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7534        let mut __tmp = BytesMut::new(bytes);
7535        #[allow(clippy::absurd_extreme_comparisons)]
7536        #[allow(unused_comparisons)]
7537        if __tmp.remaining() < Self::ENCODED_LEN {
7538            panic!(
7539                "buffer is too small (need {} bytes, but got {})",
7540                Self::ENCODED_LEN,
7541                __tmp.remaining(),
7542            )
7543        }
7544        __tmp.put_u32_le(self.time_boot_ms);
7545        __tmp.put_i32_le(self.lat_camera);
7546        __tmp.put_i32_le(self.lon_camera);
7547        __tmp.put_i32_le(self.alt_camera);
7548        __tmp.put_i32_le(self.lat_image);
7549        __tmp.put_i32_le(self.lon_image);
7550        __tmp.put_i32_le(self.alt_image);
7551        for val in &self.q {
7552            __tmp.put_f32_le(*val);
7553        }
7554        __tmp.put_f32_le(self.hfov);
7555        __tmp.put_f32_le(self.vfov);
7556        if matches!(version, MavlinkVersion::V2) {
7557            __tmp.put_u8(self.camera_device_id);
7558            let len = __tmp.len();
7559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7560        } else {
7561            __tmp.len()
7562        }
7563    }
7564}
7565#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7566#[doc = ""]
7567#[doc = "ID: 263"]
7568#[derive(Debug, Clone, PartialEq)]
7569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7571#[cfg_attr(feature = "ts", derive(TS))]
7572#[cfg_attr(feature = "ts", ts(export))]
7573pub struct CAMERA_IMAGE_CAPTURED_DATA {
7574    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7575    pub time_utc: u64,
7576    #[doc = "Timestamp (time since system boot)."]
7577    pub time_boot_ms: u32,
7578    #[doc = "Latitude where image was taken"]
7579    pub lat: i32,
7580    #[doc = "Longitude where capture was taken"]
7581    pub lon: i32,
7582    #[doc = "Altitude (MSL) where image was taken"]
7583    pub alt: i32,
7584    #[doc = "Altitude above ground"]
7585    pub relative_alt: i32,
7586    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7587    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7588    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7589    pub q: [f32; 4],
7590    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7591    pub image_index: i32,
7592    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7593    pub camera_id: u8,
7594    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7595    pub capture_result: i8,
7596    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7597    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7598    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7599    pub file_url: [u8; 205],
7600}
7601impl CAMERA_IMAGE_CAPTURED_DATA {
7602    pub const ENCODED_LEN: usize = 255usize;
7603    pub const DEFAULT: Self = Self {
7604        time_utc: 0_u64,
7605        time_boot_ms: 0_u32,
7606        lat: 0_i32,
7607        lon: 0_i32,
7608        alt: 0_i32,
7609        relative_alt: 0_i32,
7610        q: [0.0_f32; 4usize],
7611        image_index: 0_i32,
7612        camera_id: 0_u8,
7613        capture_result: 0_i8,
7614        file_url: [0_u8; 205usize],
7615    };
7616    #[cfg(feature = "arbitrary")]
7617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7618        use arbitrary::{Arbitrary, Unstructured};
7619        let mut buf = [0u8; 1024];
7620        rng.fill_bytes(&mut buf);
7621        let mut unstructured = Unstructured::new(&buf);
7622        Self::arbitrary(&mut unstructured).unwrap_or_default()
7623    }
7624}
7625impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7626    fn default() -> Self {
7627        Self::DEFAULT.clone()
7628    }
7629}
7630impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7631    type Message = MavMessage;
7632    const ID: u32 = 263u32;
7633    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7634    const EXTRA_CRC: u8 = 133u8;
7635    const ENCODED_LEN: usize = 255usize;
7636    fn deser(
7637        _version: MavlinkVersion,
7638        __input: &[u8],
7639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7640        let avail_len = __input.len();
7641        let mut payload_buf = [0; Self::ENCODED_LEN];
7642        let mut buf = if avail_len < Self::ENCODED_LEN {
7643            payload_buf[0..avail_len].copy_from_slice(__input);
7644            Bytes::new(&payload_buf)
7645        } else {
7646            Bytes::new(__input)
7647        };
7648        let mut __struct = Self::default();
7649        __struct.time_utc = buf.get_u64_le();
7650        __struct.time_boot_ms = buf.get_u32_le();
7651        __struct.lat = buf.get_i32_le();
7652        __struct.lon = buf.get_i32_le();
7653        __struct.alt = buf.get_i32_le();
7654        __struct.relative_alt = buf.get_i32_le();
7655        for v in &mut __struct.q {
7656            let val = buf.get_f32_le();
7657            *v = val;
7658        }
7659        __struct.image_index = buf.get_i32_le();
7660        __struct.camera_id = buf.get_u8();
7661        __struct.capture_result = buf.get_i8();
7662        for v in &mut __struct.file_url {
7663            let val = buf.get_u8();
7664            *v = val;
7665        }
7666        Ok(__struct)
7667    }
7668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7669        let mut __tmp = BytesMut::new(bytes);
7670        #[allow(clippy::absurd_extreme_comparisons)]
7671        #[allow(unused_comparisons)]
7672        if __tmp.remaining() < Self::ENCODED_LEN {
7673            panic!(
7674                "buffer is too small (need {} bytes, but got {})",
7675                Self::ENCODED_LEN,
7676                __tmp.remaining(),
7677            )
7678        }
7679        __tmp.put_u64_le(self.time_utc);
7680        __tmp.put_u32_le(self.time_boot_ms);
7681        __tmp.put_i32_le(self.lat);
7682        __tmp.put_i32_le(self.lon);
7683        __tmp.put_i32_le(self.alt);
7684        __tmp.put_i32_le(self.relative_alt);
7685        for val in &self.q {
7686            __tmp.put_f32_le(*val);
7687        }
7688        __tmp.put_i32_le(self.image_index);
7689        __tmp.put_u8(self.camera_id);
7690        __tmp.put_i8(self.capture_result);
7691        for val in &self.file_url {
7692            __tmp.put_u8(*val);
7693        }
7694        if matches!(version, MavlinkVersion::V2) {
7695            let len = __tmp.len();
7696            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7697        } else {
7698            __tmp.len()
7699        }
7700    }
7701}
7702#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7703#[doc = ""]
7704#[doc = "ID: 259"]
7705#[derive(Debug, Clone, PartialEq)]
7706#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7708#[cfg_attr(feature = "ts", derive(TS))]
7709#[cfg_attr(feature = "ts", ts(export))]
7710pub struct CAMERA_INFORMATION_DATA {
7711    #[doc = "Timestamp (time since system boot)."]
7712    pub time_boot_ms: u32,
7713    #[doc = "0xff). Use 0 if not known."]
7714    pub firmware_version: u32,
7715    #[doc = "Focal length. Use NaN if not known."]
7716    pub focal_length: f32,
7717    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7718    pub sensor_size_h: f32,
7719    #[doc = "Image sensor size vertical. Use NaN if not known."]
7720    pub sensor_size_v: f32,
7721    #[doc = "Bitmap of camera capability flags."]
7722    pub flags: CameraCapFlags,
7723    #[doc = "Horizontal image resolution. Use 0 if not known."]
7724    pub resolution_h: u16,
7725    #[doc = "Vertical image resolution. Use 0 if not known."]
7726    pub resolution_v: u16,
7727    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7728    pub cam_definition_version: u16,
7729    #[doc = "Name of the camera vendor"]
7730    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7731    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7732    pub vendor_name: [u8; 32],
7733    #[doc = "Name of the camera model"]
7734    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7735    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7736    pub model_name: [u8; 32],
7737    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7738    pub lens_id: u8,
7739    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7740    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7741    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7742    pub cam_definition_uri: [u8; 140],
7743    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7744    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7745    pub gimbal_device_id: u8,
7746    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7747    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7748    pub camera_device_id: u8,
7749}
7750impl CAMERA_INFORMATION_DATA {
7751    pub const ENCODED_LEN: usize = 237usize;
7752    pub const DEFAULT: Self = Self {
7753        time_boot_ms: 0_u32,
7754        firmware_version: 0_u32,
7755        focal_length: 0.0_f32,
7756        sensor_size_h: 0.0_f32,
7757        sensor_size_v: 0.0_f32,
7758        flags: CameraCapFlags::DEFAULT,
7759        resolution_h: 0_u16,
7760        resolution_v: 0_u16,
7761        cam_definition_version: 0_u16,
7762        vendor_name: [0_u8; 32usize],
7763        model_name: [0_u8; 32usize],
7764        lens_id: 0_u8,
7765        cam_definition_uri: [0_u8; 140usize],
7766        gimbal_device_id: 0_u8,
7767        camera_device_id: 0_u8,
7768    };
7769    #[cfg(feature = "arbitrary")]
7770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7771        use arbitrary::{Arbitrary, Unstructured};
7772        let mut buf = [0u8; 1024];
7773        rng.fill_bytes(&mut buf);
7774        let mut unstructured = Unstructured::new(&buf);
7775        Self::arbitrary(&mut unstructured).unwrap_or_default()
7776    }
7777}
7778impl Default for CAMERA_INFORMATION_DATA {
7779    fn default() -> Self {
7780        Self::DEFAULT.clone()
7781    }
7782}
7783impl MessageData for CAMERA_INFORMATION_DATA {
7784    type Message = MavMessage;
7785    const ID: u32 = 259u32;
7786    const NAME: &'static str = "CAMERA_INFORMATION";
7787    const EXTRA_CRC: u8 = 92u8;
7788    const ENCODED_LEN: usize = 237usize;
7789    fn deser(
7790        _version: MavlinkVersion,
7791        __input: &[u8],
7792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7793        let avail_len = __input.len();
7794        let mut payload_buf = [0; Self::ENCODED_LEN];
7795        let mut buf = if avail_len < Self::ENCODED_LEN {
7796            payload_buf[0..avail_len].copy_from_slice(__input);
7797            Bytes::new(&payload_buf)
7798        } else {
7799            Bytes::new(__input)
7800        };
7801        let mut __struct = Self::default();
7802        __struct.time_boot_ms = buf.get_u32_le();
7803        __struct.firmware_version = buf.get_u32_le();
7804        __struct.focal_length = buf.get_f32_le();
7805        __struct.sensor_size_h = buf.get_f32_le();
7806        __struct.sensor_size_v = buf.get_f32_le();
7807        let tmp = buf.get_u32_le();
7808        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7809            ::mavlink_core::error::ParserError::InvalidFlag {
7810                flag_type: "CameraCapFlags",
7811                value: tmp as u32,
7812            },
7813        )?;
7814        __struct.resolution_h = buf.get_u16_le();
7815        __struct.resolution_v = buf.get_u16_le();
7816        __struct.cam_definition_version = buf.get_u16_le();
7817        for v in &mut __struct.vendor_name {
7818            let val = buf.get_u8();
7819            *v = val;
7820        }
7821        for v in &mut __struct.model_name {
7822            let val = buf.get_u8();
7823            *v = val;
7824        }
7825        __struct.lens_id = buf.get_u8();
7826        for v in &mut __struct.cam_definition_uri {
7827            let val = buf.get_u8();
7828            *v = val;
7829        }
7830        __struct.gimbal_device_id = buf.get_u8();
7831        __struct.camera_device_id = buf.get_u8();
7832        Ok(__struct)
7833    }
7834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7835        let mut __tmp = BytesMut::new(bytes);
7836        #[allow(clippy::absurd_extreme_comparisons)]
7837        #[allow(unused_comparisons)]
7838        if __tmp.remaining() < Self::ENCODED_LEN {
7839            panic!(
7840                "buffer is too small (need {} bytes, but got {})",
7841                Self::ENCODED_LEN,
7842                __tmp.remaining(),
7843            )
7844        }
7845        __tmp.put_u32_le(self.time_boot_ms);
7846        __tmp.put_u32_le(self.firmware_version);
7847        __tmp.put_f32_le(self.focal_length);
7848        __tmp.put_f32_le(self.sensor_size_h);
7849        __tmp.put_f32_le(self.sensor_size_v);
7850        __tmp.put_u32_le(self.flags.bits());
7851        __tmp.put_u16_le(self.resolution_h);
7852        __tmp.put_u16_le(self.resolution_v);
7853        __tmp.put_u16_le(self.cam_definition_version);
7854        for val in &self.vendor_name {
7855            __tmp.put_u8(*val);
7856        }
7857        for val in &self.model_name {
7858            __tmp.put_u8(*val);
7859        }
7860        __tmp.put_u8(self.lens_id);
7861        for val in &self.cam_definition_uri {
7862            __tmp.put_u8(*val);
7863        }
7864        if matches!(version, MavlinkVersion::V2) {
7865            __tmp.put_u8(self.gimbal_device_id);
7866            __tmp.put_u8(self.camera_device_id);
7867            let len = __tmp.len();
7868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7869        } else {
7870            __tmp.len()
7871        }
7872    }
7873}
7874#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7875#[doc = ""]
7876#[doc = "ID: 260"]
7877#[derive(Debug, Clone, PartialEq)]
7878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7880#[cfg_attr(feature = "ts", derive(TS))]
7881#[cfg_attr(feature = "ts", ts(export))]
7882pub struct CAMERA_SETTINGS_DATA {
7883    #[doc = "Timestamp (time since system boot)."]
7884    pub time_boot_ms: u32,
7885    #[doc = "Camera mode"]
7886    pub mode_id: CameraMode,
7887    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7888    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7889    pub zoomLevel: f32,
7890    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7891    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7892    pub focusLevel: f32,
7893    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7894    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7895    pub camera_device_id: u8,
7896}
7897impl CAMERA_SETTINGS_DATA {
7898    pub const ENCODED_LEN: usize = 14usize;
7899    pub const DEFAULT: Self = Self {
7900        time_boot_ms: 0_u32,
7901        mode_id: CameraMode::DEFAULT,
7902        zoomLevel: 0.0_f32,
7903        focusLevel: 0.0_f32,
7904        camera_device_id: 0_u8,
7905    };
7906    #[cfg(feature = "arbitrary")]
7907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7908        use arbitrary::{Arbitrary, Unstructured};
7909        let mut buf = [0u8; 1024];
7910        rng.fill_bytes(&mut buf);
7911        let mut unstructured = Unstructured::new(&buf);
7912        Self::arbitrary(&mut unstructured).unwrap_or_default()
7913    }
7914}
7915impl Default for CAMERA_SETTINGS_DATA {
7916    fn default() -> Self {
7917        Self::DEFAULT.clone()
7918    }
7919}
7920impl MessageData for CAMERA_SETTINGS_DATA {
7921    type Message = MavMessage;
7922    const ID: u32 = 260u32;
7923    const NAME: &'static str = "CAMERA_SETTINGS";
7924    const EXTRA_CRC: u8 = 146u8;
7925    const ENCODED_LEN: usize = 14usize;
7926    fn deser(
7927        _version: MavlinkVersion,
7928        __input: &[u8],
7929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7930        let avail_len = __input.len();
7931        let mut payload_buf = [0; Self::ENCODED_LEN];
7932        let mut buf = if avail_len < Self::ENCODED_LEN {
7933            payload_buf[0..avail_len].copy_from_slice(__input);
7934            Bytes::new(&payload_buf)
7935        } else {
7936            Bytes::new(__input)
7937        };
7938        let mut __struct = Self::default();
7939        __struct.time_boot_ms = buf.get_u32_le();
7940        let tmp = buf.get_u8();
7941        __struct.mode_id =
7942            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7943                enum_type: "CameraMode",
7944                value: tmp as u32,
7945            })?;
7946        __struct.zoomLevel = buf.get_f32_le();
7947        __struct.focusLevel = buf.get_f32_le();
7948        __struct.camera_device_id = buf.get_u8();
7949        Ok(__struct)
7950    }
7951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7952        let mut __tmp = BytesMut::new(bytes);
7953        #[allow(clippy::absurd_extreme_comparisons)]
7954        #[allow(unused_comparisons)]
7955        if __tmp.remaining() < Self::ENCODED_LEN {
7956            panic!(
7957                "buffer is too small (need {} bytes, but got {})",
7958                Self::ENCODED_LEN,
7959                __tmp.remaining(),
7960            )
7961        }
7962        __tmp.put_u32_le(self.time_boot_ms);
7963        __tmp.put_u8(self.mode_id as u8);
7964        if matches!(version, MavlinkVersion::V2) {
7965            __tmp.put_f32_le(self.zoomLevel);
7966            __tmp.put_f32_le(self.focusLevel);
7967            __tmp.put_u8(self.camera_device_id);
7968            let len = __tmp.len();
7969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7970        } else {
7971            __tmp.len()
7972        }
7973    }
7974}
7975#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7976#[doc = ""]
7977#[doc = "ID: 277"]
7978#[derive(Debug, Clone, PartialEq)]
7979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7981#[cfg_attr(feature = "ts", derive(TS))]
7982#[cfg_attr(feature = "ts", ts(export))]
7983pub struct CAMERA_THERMAL_RANGE_DATA {
7984    #[doc = "Timestamp (time since system boot)."]
7985    pub time_boot_ms: u32,
7986    #[doc = "Temperature max."]
7987    pub max: f32,
7988    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7989    pub max_point_x: f32,
7990    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7991    pub max_point_y: f32,
7992    #[doc = "Temperature min."]
7993    pub min: f32,
7994    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7995    pub min_point_x: f32,
7996    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7997    pub min_point_y: f32,
7998    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7999    pub stream_id: u8,
8000    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8001    pub camera_device_id: u8,
8002}
8003impl CAMERA_THERMAL_RANGE_DATA {
8004    pub const ENCODED_LEN: usize = 30usize;
8005    pub const DEFAULT: Self = Self {
8006        time_boot_ms: 0_u32,
8007        max: 0.0_f32,
8008        max_point_x: 0.0_f32,
8009        max_point_y: 0.0_f32,
8010        min: 0.0_f32,
8011        min_point_x: 0.0_f32,
8012        min_point_y: 0.0_f32,
8013        stream_id: 0_u8,
8014        camera_device_id: 0_u8,
8015    };
8016    #[cfg(feature = "arbitrary")]
8017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8018        use arbitrary::{Arbitrary, Unstructured};
8019        let mut buf = [0u8; 1024];
8020        rng.fill_bytes(&mut buf);
8021        let mut unstructured = Unstructured::new(&buf);
8022        Self::arbitrary(&mut unstructured).unwrap_or_default()
8023    }
8024}
8025impl Default for CAMERA_THERMAL_RANGE_DATA {
8026    fn default() -> Self {
8027        Self::DEFAULT.clone()
8028    }
8029}
8030impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8031    type Message = MavMessage;
8032    const ID: u32 = 277u32;
8033    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8034    const EXTRA_CRC: u8 = 62u8;
8035    const ENCODED_LEN: usize = 30usize;
8036    fn deser(
8037        _version: MavlinkVersion,
8038        __input: &[u8],
8039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8040        let avail_len = __input.len();
8041        let mut payload_buf = [0; Self::ENCODED_LEN];
8042        let mut buf = if avail_len < Self::ENCODED_LEN {
8043            payload_buf[0..avail_len].copy_from_slice(__input);
8044            Bytes::new(&payload_buf)
8045        } else {
8046            Bytes::new(__input)
8047        };
8048        let mut __struct = Self::default();
8049        __struct.time_boot_ms = buf.get_u32_le();
8050        __struct.max = buf.get_f32_le();
8051        __struct.max_point_x = buf.get_f32_le();
8052        __struct.max_point_y = buf.get_f32_le();
8053        __struct.min = buf.get_f32_le();
8054        __struct.min_point_x = buf.get_f32_le();
8055        __struct.min_point_y = buf.get_f32_le();
8056        __struct.stream_id = buf.get_u8();
8057        __struct.camera_device_id = buf.get_u8();
8058        Ok(__struct)
8059    }
8060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8061        let mut __tmp = BytesMut::new(bytes);
8062        #[allow(clippy::absurd_extreme_comparisons)]
8063        #[allow(unused_comparisons)]
8064        if __tmp.remaining() < Self::ENCODED_LEN {
8065            panic!(
8066                "buffer is too small (need {} bytes, but got {})",
8067                Self::ENCODED_LEN,
8068                __tmp.remaining(),
8069            )
8070        }
8071        __tmp.put_u32_le(self.time_boot_ms);
8072        __tmp.put_f32_le(self.max);
8073        __tmp.put_f32_le(self.max_point_x);
8074        __tmp.put_f32_le(self.max_point_y);
8075        __tmp.put_f32_le(self.min);
8076        __tmp.put_f32_le(self.min_point_x);
8077        __tmp.put_f32_le(self.min_point_y);
8078        __tmp.put_u8(self.stream_id);
8079        __tmp.put_u8(self.camera_device_id);
8080        if matches!(version, MavlinkVersion::V2) {
8081            let len = __tmp.len();
8082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8083        } else {
8084            __tmp.len()
8085        }
8086    }
8087}
8088#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8089#[doc = ""]
8090#[doc = "ID: 276"]
8091#[derive(Debug, Clone, PartialEq)]
8092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8094#[cfg_attr(feature = "ts", derive(TS))]
8095#[cfg_attr(feature = "ts", ts(export))]
8096pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8097    #[doc = "Latitude of tracked object"]
8098    pub lat: i32,
8099    #[doc = "Longitude of tracked object"]
8100    pub lon: i32,
8101    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8102    pub alt: f32,
8103    #[doc = "Horizontal accuracy. NAN if unknown"]
8104    pub h_acc: f32,
8105    #[doc = "Vertical accuracy. NAN if unknown"]
8106    pub v_acc: f32,
8107    #[doc = "North velocity of tracked object. NAN if unknown"]
8108    pub vel_n: f32,
8109    #[doc = "East velocity of tracked object. NAN if unknown"]
8110    pub vel_e: f32,
8111    #[doc = "Down velocity of tracked object. NAN if unknown"]
8112    pub vel_d: f32,
8113    #[doc = "Velocity accuracy. NAN if unknown"]
8114    pub vel_acc: f32,
8115    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8116    pub dist: f32,
8117    #[doc = "Heading in radians, in NED. NAN if unknown"]
8118    pub hdg: f32,
8119    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8120    pub hdg_acc: f32,
8121    #[doc = "Current tracking status"]
8122    pub tracking_status: CameraTrackingStatusFlags,
8123    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8124    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8125    pub camera_device_id: u8,
8126}
8127impl CAMERA_TRACKING_GEO_STATUS_DATA {
8128    pub const ENCODED_LEN: usize = 50usize;
8129    pub const DEFAULT: Self = Self {
8130        lat: 0_i32,
8131        lon: 0_i32,
8132        alt: 0.0_f32,
8133        h_acc: 0.0_f32,
8134        v_acc: 0.0_f32,
8135        vel_n: 0.0_f32,
8136        vel_e: 0.0_f32,
8137        vel_d: 0.0_f32,
8138        vel_acc: 0.0_f32,
8139        dist: 0.0_f32,
8140        hdg: 0.0_f32,
8141        hdg_acc: 0.0_f32,
8142        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8143        camera_device_id: 0_u8,
8144    };
8145    #[cfg(feature = "arbitrary")]
8146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8147        use arbitrary::{Arbitrary, Unstructured};
8148        let mut buf = [0u8; 1024];
8149        rng.fill_bytes(&mut buf);
8150        let mut unstructured = Unstructured::new(&buf);
8151        Self::arbitrary(&mut unstructured).unwrap_or_default()
8152    }
8153}
8154impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8155    fn default() -> Self {
8156        Self::DEFAULT.clone()
8157    }
8158}
8159impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8160    type Message = MavMessage;
8161    const ID: u32 = 276u32;
8162    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8163    const EXTRA_CRC: u8 = 18u8;
8164    const ENCODED_LEN: usize = 50usize;
8165    fn deser(
8166        _version: MavlinkVersion,
8167        __input: &[u8],
8168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8169        let avail_len = __input.len();
8170        let mut payload_buf = [0; Self::ENCODED_LEN];
8171        let mut buf = if avail_len < Self::ENCODED_LEN {
8172            payload_buf[0..avail_len].copy_from_slice(__input);
8173            Bytes::new(&payload_buf)
8174        } else {
8175            Bytes::new(__input)
8176        };
8177        let mut __struct = Self::default();
8178        __struct.lat = buf.get_i32_le();
8179        __struct.lon = buf.get_i32_le();
8180        __struct.alt = buf.get_f32_le();
8181        __struct.h_acc = buf.get_f32_le();
8182        __struct.v_acc = buf.get_f32_le();
8183        __struct.vel_n = buf.get_f32_le();
8184        __struct.vel_e = buf.get_f32_le();
8185        __struct.vel_d = buf.get_f32_le();
8186        __struct.vel_acc = buf.get_f32_le();
8187        __struct.dist = buf.get_f32_le();
8188        __struct.hdg = buf.get_f32_le();
8189        __struct.hdg_acc = buf.get_f32_le();
8190        let tmp = buf.get_u8();
8191        __struct.tracking_status =
8192            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8193                enum_type: "CameraTrackingStatusFlags",
8194                value: tmp as u32,
8195            })?;
8196        __struct.camera_device_id = buf.get_u8();
8197        Ok(__struct)
8198    }
8199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8200        let mut __tmp = BytesMut::new(bytes);
8201        #[allow(clippy::absurd_extreme_comparisons)]
8202        #[allow(unused_comparisons)]
8203        if __tmp.remaining() < Self::ENCODED_LEN {
8204            panic!(
8205                "buffer is too small (need {} bytes, but got {})",
8206                Self::ENCODED_LEN,
8207                __tmp.remaining(),
8208            )
8209        }
8210        __tmp.put_i32_le(self.lat);
8211        __tmp.put_i32_le(self.lon);
8212        __tmp.put_f32_le(self.alt);
8213        __tmp.put_f32_le(self.h_acc);
8214        __tmp.put_f32_le(self.v_acc);
8215        __tmp.put_f32_le(self.vel_n);
8216        __tmp.put_f32_le(self.vel_e);
8217        __tmp.put_f32_le(self.vel_d);
8218        __tmp.put_f32_le(self.vel_acc);
8219        __tmp.put_f32_le(self.dist);
8220        __tmp.put_f32_le(self.hdg);
8221        __tmp.put_f32_le(self.hdg_acc);
8222        __tmp.put_u8(self.tracking_status as u8);
8223        if matches!(version, MavlinkVersion::V2) {
8224            __tmp.put_u8(self.camera_device_id);
8225            let len = __tmp.len();
8226            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8227        } else {
8228            __tmp.len()
8229        }
8230    }
8231}
8232#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8233#[doc = ""]
8234#[doc = "ID: 275"]
8235#[derive(Debug, Clone, PartialEq)]
8236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8238#[cfg_attr(feature = "ts", derive(TS))]
8239#[cfg_attr(feature = "ts", ts(export))]
8240pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8241    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8242    pub point_x: f32,
8243    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8244    pub point_y: f32,
8245    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8246    pub radius: f32,
8247    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8248    pub rec_top_x: f32,
8249    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8250    pub rec_top_y: f32,
8251    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8252    pub rec_bottom_x: f32,
8253    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8254    pub rec_bottom_y: f32,
8255    #[doc = "Current tracking status"]
8256    pub tracking_status: CameraTrackingStatusFlags,
8257    #[doc = "Current tracking mode"]
8258    pub tracking_mode: CameraTrackingMode,
8259    #[doc = "Defines location of target data"]
8260    pub target_data: CameraTrackingTargetData,
8261    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8262    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8263    pub camera_device_id: u8,
8264}
8265impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8266    pub const ENCODED_LEN: usize = 32usize;
8267    pub const DEFAULT: Self = Self {
8268        point_x: 0.0_f32,
8269        point_y: 0.0_f32,
8270        radius: 0.0_f32,
8271        rec_top_x: 0.0_f32,
8272        rec_top_y: 0.0_f32,
8273        rec_bottom_x: 0.0_f32,
8274        rec_bottom_y: 0.0_f32,
8275        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8276        tracking_mode: CameraTrackingMode::DEFAULT,
8277        target_data: CameraTrackingTargetData::DEFAULT,
8278        camera_device_id: 0_u8,
8279    };
8280    #[cfg(feature = "arbitrary")]
8281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8282        use arbitrary::{Arbitrary, Unstructured};
8283        let mut buf = [0u8; 1024];
8284        rng.fill_bytes(&mut buf);
8285        let mut unstructured = Unstructured::new(&buf);
8286        Self::arbitrary(&mut unstructured).unwrap_or_default()
8287    }
8288}
8289impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8290    fn default() -> Self {
8291        Self::DEFAULT.clone()
8292    }
8293}
8294impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8295    type Message = MavMessage;
8296    const ID: u32 = 275u32;
8297    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8298    const EXTRA_CRC: u8 = 126u8;
8299    const ENCODED_LEN: usize = 32usize;
8300    fn deser(
8301        _version: MavlinkVersion,
8302        __input: &[u8],
8303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8304        let avail_len = __input.len();
8305        let mut payload_buf = [0; Self::ENCODED_LEN];
8306        let mut buf = if avail_len < Self::ENCODED_LEN {
8307            payload_buf[0..avail_len].copy_from_slice(__input);
8308            Bytes::new(&payload_buf)
8309        } else {
8310            Bytes::new(__input)
8311        };
8312        let mut __struct = Self::default();
8313        __struct.point_x = buf.get_f32_le();
8314        __struct.point_y = buf.get_f32_le();
8315        __struct.radius = buf.get_f32_le();
8316        __struct.rec_top_x = buf.get_f32_le();
8317        __struct.rec_top_y = buf.get_f32_le();
8318        __struct.rec_bottom_x = buf.get_f32_le();
8319        __struct.rec_bottom_y = buf.get_f32_le();
8320        let tmp = buf.get_u8();
8321        __struct.tracking_status =
8322            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8323                enum_type: "CameraTrackingStatusFlags",
8324                value: tmp as u32,
8325            })?;
8326        let tmp = buf.get_u8();
8327        __struct.tracking_mode =
8328            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8329                enum_type: "CameraTrackingMode",
8330                value: tmp as u32,
8331            })?;
8332        let tmp = buf.get_u8();
8333        __struct.target_data =
8334            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
8335                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8336                    flag_type: "CameraTrackingTargetData",
8337                    value: tmp as u32,
8338                })?;
8339        __struct.camera_device_id = buf.get_u8();
8340        Ok(__struct)
8341    }
8342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8343        let mut __tmp = BytesMut::new(bytes);
8344        #[allow(clippy::absurd_extreme_comparisons)]
8345        #[allow(unused_comparisons)]
8346        if __tmp.remaining() < Self::ENCODED_LEN {
8347            panic!(
8348                "buffer is too small (need {} bytes, but got {})",
8349                Self::ENCODED_LEN,
8350                __tmp.remaining(),
8351            )
8352        }
8353        __tmp.put_f32_le(self.point_x);
8354        __tmp.put_f32_le(self.point_y);
8355        __tmp.put_f32_le(self.radius);
8356        __tmp.put_f32_le(self.rec_top_x);
8357        __tmp.put_f32_le(self.rec_top_y);
8358        __tmp.put_f32_le(self.rec_bottom_x);
8359        __tmp.put_f32_le(self.rec_bottom_y);
8360        __tmp.put_u8(self.tracking_status as u8);
8361        __tmp.put_u8(self.tracking_mode as u8);
8362        __tmp.put_u8(self.target_data.bits());
8363        if matches!(version, MavlinkVersion::V2) {
8364            __tmp.put_u8(self.camera_device_id);
8365            let len = __tmp.len();
8366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8367        } else {
8368            __tmp.len()
8369        }
8370    }
8371}
8372#[doc = "Camera-IMU triggering and synchronisation message."]
8373#[doc = ""]
8374#[doc = "ID: 112"]
8375#[derive(Debug, Clone, PartialEq)]
8376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8378#[cfg_attr(feature = "ts", derive(TS))]
8379#[cfg_attr(feature = "ts", ts(export))]
8380pub struct CAMERA_TRIGGER_DATA {
8381    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8382    pub time_usec: u64,
8383    #[doc = "Image frame sequence"]
8384    pub seq: u32,
8385}
8386impl CAMERA_TRIGGER_DATA {
8387    pub const ENCODED_LEN: usize = 12usize;
8388    pub const DEFAULT: Self = Self {
8389        time_usec: 0_u64,
8390        seq: 0_u32,
8391    };
8392    #[cfg(feature = "arbitrary")]
8393    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8394        use arbitrary::{Arbitrary, Unstructured};
8395        let mut buf = [0u8; 1024];
8396        rng.fill_bytes(&mut buf);
8397        let mut unstructured = Unstructured::new(&buf);
8398        Self::arbitrary(&mut unstructured).unwrap_or_default()
8399    }
8400}
8401impl Default for CAMERA_TRIGGER_DATA {
8402    fn default() -> Self {
8403        Self::DEFAULT.clone()
8404    }
8405}
8406impl MessageData for CAMERA_TRIGGER_DATA {
8407    type Message = MavMessage;
8408    const ID: u32 = 112u32;
8409    const NAME: &'static str = "CAMERA_TRIGGER";
8410    const EXTRA_CRC: u8 = 174u8;
8411    const ENCODED_LEN: usize = 12usize;
8412    fn deser(
8413        _version: MavlinkVersion,
8414        __input: &[u8],
8415    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8416        let avail_len = __input.len();
8417        let mut payload_buf = [0; Self::ENCODED_LEN];
8418        let mut buf = if avail_len < Self::ENCODED_LEN {
8419            payload_buf[0..avail_len].copy_from_slice(__input);
8420            Bytes::new(&payload_buf)
8421        } else {
8422            Bytes::new(__input)
8423        };
8424        let mut __struct = Self::default();
8425        __struct.time_usec = buf.get_u64_le();
8426        __struct.seq = buf.get_u32_le();
8427        Ok(__struct)
8428    }
8429    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8430        let mut __tmp = BytesMut::new(bytes);
8431        #[allow(clippy::absurd_extreme_comparisons)]
8432        #[allow(unused_comparisons)]
8433        if __tmp.remaining() < Self::ENCODED_LEN {
8434            panic!(
8435                "buffer is too small (need {} bytes, but got {})",
8436                Self::ENCODED_LEN,
8437                __tmp.remaining(),
8438            )
8439        }
8440        __tmp.put_u64_le(self.time_usec);
8441        __tmp.put_u32_le(self.seq);
8442        if matches!(version, MavlinkVersion::V2) {
8443            let len = __tmp.len();
8444            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8445        } else {
8446            __tmp.len()
8447        }
8448    }
8449}
8450#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8451#[doc = ""]
8452#[doc = "ID: 387"]
8453#[derive(Debug, Clone, PartialEq)]
8454#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8456#[cfg_attr(feature = "ts", derive(TS))]
8457#[cfg_attr(feature = "ts", ts(export))]
8458pub struct CANFD_FRAME_DATA {
8459    #[doc = "Frame ID"]
8460    pub id: u32,
8461    #[doc = "System ID."]
8462    pub target_system: u8,
8463    #[doc = "Component ID."]
8464    pub target_component: u8,
8465    #[doc = "bus number"]
8466    pub bus: u8,
8467    #[doc = "Frame length"]
8468    pub len: u8,
8469    #[doc = "Frame data"]
8470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8471    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8472    pub data: [u8; 64],
8473}
8474impl CANFD_FRAME_DATA {
8475    pub const ENCODED_LEN: usize = 72usize;
8476    pub const DEFAULT: Self = Self {
8477        id: 0_u32,
8478        target_system: 0_u8,
8479        target_component: 0_u8,
8480        bus: 0_u8,
8481        len: 0_u8,
8482        data: [0_u8; 64usize],
8483    };
8484    #[cfg(feature = "arbitrary")]
8485    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8486        use arbitrary::{Arbitrary, Unstructured};
8487        let mut buf = [0u8; 1024];
8488        rng.fill_bytes(&mut buf);
8489        let mut unstructured = Unstructured::new(&buf);
8490        Self::arbitrary(&mut unstructured).unwrap_or_default()
8491    }
8492}
8493impl Default for CANFD_FRAME_DATA {
8494    fn default() -> Self {
8495        Self::DEFAULT.clone()
8496    }
8497}
8498impl MessageData for CANFD_FRAME_DATA {
8499    type Message = MavMessage;
8500    const ID: u32 = 387u32;
8501    const NAME: &'static str = "CANFD_FRAME";
8502    const EXTRA_CRC: u8 = 4u8;
8503    const ENCODED_LEN: usize = 72usize;
8504    fn deser(
8505        _version: MavlinkVersion,
8506        __input: &[u8],
8507    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8508        let avail_len = __input.len();
8509        let mut payload_buf = [0; Self::ENCODED_LEN];
8510        let mut buf = if avail_len < Self::ENCODED_LEN {
8511            payload_buf[0..avail_len].copy_from_slice(__input);
8512            Bytes::new(&payload_buf)
8513        } else {
8514            Bytes::new(__input)
8515        };
8516        let mut __struct = Self::default();
8517        __struct.id = buf.get_u32_le();
8518        __struct.target_system = buf.get_u8();
8519        __struct.target_component = buf.get_u8();
8520        __struct.bus = buf.get_u8();
8521        __struct.len = buf.get_u8();
8522        for v in &mut __struct.data {
8523            let val = buf.get_u8();
8524            *v = val;
8525        }
8526        Ok(__struct)
8527    }
8528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8529        let mut __tmp = BytesMut::new(bytes);
8530        #[allow(clippy::absurd_extreme_comparisons)]
8531        #[allow(unused_comparisons)]
8532        if __tmp.remaining() < Self::ENCODED_LEN {
8533            panic!(
8534                "buffer is too small (need {} bytes, but got {})",
8535                Self::ENCODED_LEN,
8536                __tmp.remaining(),
8537            )
8538        }
8539        __tmp.put_u32_le(self.id);
8540        __tmp.put_u8(self.target_system);
8541        __tmp.put_u8(self.target_component);
8542        __tmp.put_u8(self.bus);
8543        __tmp.put_u8(self.len);
8544        for val in &self.data {
8545            __tmp.put_u8(*val);
8546        }
8547        if matches!(version, MavlinkVersion::V2) {
8548            let len = __tmp.len();
8549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8550        } else {
8551            __tmp.len()
8552        }
8553    }
8554}
8555#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8556#[doc = ""]
8557#[doc = "ID: 388"]
8558#[derive(Debug, Clone, PartialEq)]
8559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8561#[cfg_attr(feature = "ts", derive(TS))]
8562#[cfg_attr(feature = "ts", ts(export))]
8563pub struct CAN_FILTER_MODIFY_DATA {
8564    #[doc = "filter IDs, length num_ids"]
8565    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8566    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8567    pub ids: [u16; 16],
8568    #[doc = "System ID."]
8569    pub target_system: u8,
8570    #[doc = "Component ID."]
8571    pub target_component: u8,
8572    #[doc = "bus number"]
8573    pub bus: u8,
8574    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8575    pub operation: CanFilterOp,
8576    #[doc = "number of IDs in filter list"]
8577    pub num_ids: u8,
8578}
8579impl CAN_FILTER_MODIFY_DATA {
8580    pub const ENCODED_LEN: usize = 37usize;
8581    pub const DEFAULT: Self = Self {
8582        ids: [0_u16; 16usize],
8583        target_system: 0_u8,
8584        target_component: 0_u8,
8585        bus: 0_u8,
8586        operation: CanFilterOp::DEFAULT,
8587        num_ids: 0_u8,
8588    };
8589    #[cfg(feature = "arbitrary")]
8590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8591        use arbitrary::{Arbitrary, Unstructured};
8592        let mut buf = [0u8; 1024];
8593        rng.fill_bytes(&mut buf);
8594        let mut unstructured = Unstructured::new(&buf);
8595        Self::arbitrary(&mut unstructured).unwrap_or_default()
8596    }
8597}
8598impl Default for CAN_FILTER_MODIFY_DATA {
8599    fn default() -> Self {
8600        Self::DEFAULT.clone()
8601    }
8602}
8603impl MessageData for CAN_FILTER_MODIFY_DATA {
8604    type Message = MavMessage;
8605    const ID: u32 = 388u32;
8606    const NAME: &'static str = "CAN_FILTER_MODIFY";
8607    const EXTRA_CRC: u8 = 8u8;
8608    const ENCODED_LEN: usize = 37usize;
8609    fn deser(
8610        _version: MavlinkVersion,
8611        __input: &[u8],
8612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8613        let avail_len = __input.len();
8614        let mut payload_buf = [0; Self::ENCODED_LEN];
8615        let mut buf = if avail_len < Self::ENCODED_LEN {
8616            payload_buf[0..avail_len].copy_from_slice(__input);
8617            Bytes::new(&payload_buf)
8618        } else {
8619            Bytes::new(__input)
8620        };
8621        let mut __struct = Self::default();
8622        for v in &mut __struct.ids {
8623            let val = buf.get_u16_le();
8624            *v = val;
8625        }
8626        __struct.target_system = buf.get_u8();
8627        __struct.target_component = buf.get_u8();
8628        __struct.bus = buf.get_u8();
8629        let tmp = buf.get_u8();
8630        __struct.operation =
8631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8632                enum_type: "CanFilterOp",
8633                value: tmp as u32,
8634            })?;
8635        __struct.num_ids = buf.get_u8();
8636        Ok(__struct)
8637    }
8638    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8639        let mut __tmp = BytesMut::new(bytes);
8640        #[allow(clippy::absurd_extreme_comparisons)]
8641        #[allow(unused_comparisons)]
8642        if __tmp.remaining() < Self::ENCODED_LEN {
8643            panic!(
8644                "buffer is too small (need {} bytes, but got {})",
8645                Self::ENCODED_LEN,
8646                __tmp.remaining(),
8647            )
8648        }
8649        for val in &self.ids {
8650            __tmp.put_u16_le(*val);
8651        }
8652        __tmp.put_u8(self.target_system);
8653        __tmp.put_u8(self.target_component);
8654        __tmp.put_u8(self.bus);
8655        __tmp.put_u8(self.operation as u8);
8656        __tmp.put_u8(self.num_ids);
8657        if matches!(version, MavlinkVersion::V2) {
8658            let len = __tmp.len();
8659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8660        } else {
8661            __tmp.len()
8662        }
8663    }
8664}
8665#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8666#[doc = ""]
8667#[doc = "ID: 386"]
8668#[derive(Debug, Clone, PartialEq)]
8669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8671#[cfg_attr(feature = "ts", derive(TS))]
8672#[cfg_attr(feature = "ts", ts(export))]
8673pub struct CAN_FRAME_DATA {
8674    #[doc = "Frame ID"]
8675    pub id: u32,
8676    #[doc = "System ID."]
8677    pub target_system: u8,
8678    #[doc = "Component ID."]
8679    pub target_component: u8,
8680    #[doc = "Bus number"]
8681    pub bus: u8,
8682    #[doc = "Frame length"]
8683    pub len: u8,
8684    #[doc = "Frame data"]
8685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8687    pub data: [u8; 8],
8688}
8689impl CAN_FRAME_DATA {
8690    pub const ENCODED_LEN: usize = 16usize;
8691    pub const DEFAULT: Self = Self {
8692        id: 0_u32,
8693        target_system: 0_u8,
8694        target_component: 0_u8,
8695        bus: 0_u8,
8696        len: 0_u8,
8697        data: [0_u8; 8usize],
8698    };
8699    #[cfg(feature = "arbitrary")]
8700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8701        use arbitrary::{Arbitrary, Unstructured};
8702        let mut buf = [0u8; 1024];
8703        rng.fill_bytes(&mut buf);
8704        let mut unstructured = Unstructured::new(&buf);
8705        Self::arbitrary(&mut unstructured).unwrap_or_default()
8706    }
8707}
8708impl Default for CAN_FRAME_DATA {
8709    fn default() -> Self {
8710        Self::DEFAULT.clone()
8711    }
8712}
8713impl MessageData for CAN_FRAME_DATA {
8714    type Message = MavMessage;
8715    const ID: u32 = 386u32;
8716    const NAME: &'static str = "CAN_FRAME";
8717    const EXTRA_CRC: u8 = 132u8;
8718    const ENCODED_LEN: usize = 16usize;
8719    fn deser(
8720        _version: MavlinkVersion,
8721        __input: &[u8],
8722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8723        let avail_len = __input.len();
8724        let mut payload_buf = [0; Self::ENCODED_LEN];
8725        let mut buf = if avail_len < Self::ENCODED_LEN {
8726            payload_buf[0..avail_len].copy_from_slice(__input);
8727            Bytes::new(&payload_buf)
8728        } else {
8729            Bytes::new(__input)
8730        };
8731        let mut __struct = Self::default();
8732        __struct.id = buf.get_u32_le();
8733        __struct.target_system = buf.get_u8();
8734        __struct.target_component = buf.get_u8();
8735        __struct.bus = buf.get_u8();
8736        __struct.len = buf.get_u8();
8737        for v in &mut __struct.data {
8738            let val = buf.get_u8();
8739            *v = val;
8740        }
8741        Ok(__struct)
8742    }
8743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8744        let mut __tmp = BytesMut::new(bytes);
8745        #[allow(clippy::absurd_extreme_comparisons)]
8746        #[allow(unused_comparisons)]
8747        if __tmp.remaining() < Self::ENCODED_LEN {
8748            panic!(
8749                "buffer is too small (need {} bytes, but got {})",
8750                Self::ENCODED_LEN,
8751                __tmp.remaining(),
8752            )
8753        }
8754        __tmp.put_u32_le(self.id);
8755        __tmp.put_u8(self.target_system);
8756        __tmp.put_u8(self.target_component);
8757        __tmp.put_u8(self.bus);
8758        __tmp.put_u8(self.len);
8759        for val in &self.data {
8760            __tmp.put_u8(*val);
8761        }
8762        if matches!(version, MavlinkVersion::V2) {
8763            let len = __tmp.len();
8764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8765        } else {
8766            __tmp.len()
8767        }
8768    }
8769}
8770#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8771#[doc = ""]
8772#[doc = "ID: 336"]
8773#[derive(Debug, Clone, PartialEq)]
8774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8776#[cfg_attr(feature = "ts", derive(TS))]
8777#[cfg_attr(feature = "ts", ts(export))]
8778pub struct CELLULAR_CONFIG_DATA {
8779    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8780    pub enable_lte: u8,
8781    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8782    pub enable_pin: u8,
8783    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8784    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8785    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8786    pub pin: [u8; 16],
8787    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8788    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8789    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8790    pub new_pin: [u8; 16],
8791    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8792    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8793    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8794    pub apn: [u8; 32],
8795    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8796    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8797    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8798    pub puk: [u8; 16],
8799    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8800    pub roaming: u8,
8801    #[doc = "Message acceptance response (sent back to GS)."]
8802    pub response: CellularConfigResponse,
8803}
8804impl CELLULAR_CONFIG_DATA {
8805    pub const ENCODED_LEN: usize = 84usize;
8806    pub const DEFAULT: Self = Self {
8807        enable_lte: 0_u8,
8808        enable_pin: 0_u8,
8809        pin: [0_u8; 16usize],
8810        new_pin: [0_u8; 16usize],
8811        apn: [0_u8; 32usize],
8812        puk: [0_u8; 16usize],
8813        roaming: 0_u8,
8814        response: CellularConfigResponse::DEFAULT,
8815    };
8816    #[cfg(feature = "arbitrary")]
8817    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8818        use arbitrary::{Arbitrary, Unstructured};
8819        let mut buf = [0u8; 1024];
8820        rng.fill_bytes(&mut buf);
8821        let mut unstructured = Unstructured::new(&buf);
8822        Self::arbitrary(&mut unstructured).unwrap_or_default()
8823    }
8824}
8825impl Default for CELLULAR_CONFIG_DATA {
8826    fn default() -> Self {
8827        Self::DEFAULT.clone()
8828    }
8829}
8830impl MessageData for CELLULAR_CONFIG_DATA {
8831    type Message = MavMessage;
8832    const ID: u32 = 336u32;
8833    const NAME: &'static str = "CELLULAR_CONFIG";
8834    const EXTRA_CRC: u8 = 245u8;
8835    const ENCODED_LEN: usize = 84usize;
8836    fn deser(
8837        _version: MavlinkVersion,
8838        __input: &[u8],
8839    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8840        let avail_len = __input.len();
8841        let mut payload_buf = [0; Self::ENCODED_LEN];
8842        let mut buf = if avail_len < Self::ENCODED_LEN {
8843            payload_buf[0..avail_len].copy_from_slice(__input);
8844            Bytes::new(&payload_buf)
8845        } else {
8846            Bytes::new(__input)
8847        };
8848        let mut __struct = Self::default();
8849        __struct.enable_lte = buf.get_u8();
8850        __struct.enable_pin = buf.get_u8();
8851        for v in &mut __struct.pin {
8852            let val = buf.get_u8();
8853            *v = val;
8854        }
8855        for v in &mut __struct.new_pin {
8856            let val = buf.get_u8();
8857            *v = val;
8858        }
8859        for v in &mut __struct.apn {
8860            let val = buf.get_u8();
8861            *v = val;
8862        }
8863        for v in &mut __struct.puk {
8864            let val = buf.get_u8();
8865            *v = val;
8866        }
8867        __struct.roaming = buf.get_u8();
8868        let tmp = buf.get_u8();
8869        __struct.response =
8870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8871                enum_type: "CellularConfigResponse",
8872                value: tmp as u32,
8873            })?;
8874        Ok(__struct)
8875    }
8876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8877        let mut __tmp = BytesMut::new(bytes);
8878        #[allow(clippy::absurd_extreme_comparisons)]
8879        #[allow(unused_comparisons)]
8880        if __tmp.remaining() < Self::ENCODED_LEN {
8881            panic!(
8882                "buffer is too small (need {} bytes, but got {})",
8883                Self::ENCODED_LEN,
8884                __tmp.remaining(),
8885            )
8886        }
8887        __tmp.put_u8(self.enable_lte);
8888        __tmp.put_u8(self.enable_pin);
8889        for val in &self.pin {
8890            __tmp.put_u8(*val);
8891        }
8892        for val in &self.new_pin {
8893            __tmp.put_u8(*val);
8894        }
8895        for val in &self.apn {
8896            __tmp.put_u8(*val);
8897        }
8898        for val in &self.puk {
8899            __tmp.put_u8(*val);
8900        }
8901        __tmp.put_u8(self.roaming);
8902        __tmp.put_u8(self.response as u8);
8903        if matches!(version, MavlinkVersion::V2) {
8904            let len = __tmp.len();
8905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8906        } else {
8907            __tmp.len()
8908        }
8909    }
8910}
8911#[doc = "Report current used cellular network status."]
8912#[doc = ""]
8913#[doc = "ID: 334"]
8914#[derive(Debug, Clone, PartialEq)]
8915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8917#[cfg_attr(feature = "ts", derive(TS))]
8918#[cfg_attr(feature = "ts", ts(export))]
8919pub struct CELLULAR_STATUS_DATA {
8920    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8921    pub mcc: u16,
8922    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8923    pub mnc: u16,
8924    #[doc = "Location area code. If unknown, set to 0"]
8925    pub lac: u16,
8926    #[doc = "Cellular modem status"]
8927    pub status: CellularStatusFlag,
8928    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8929    pub failure_reason: CellularNetworkFailedReason,
8930    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8931    pub mavtype: CellularNetworkRadioType,
8932    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8933    pub quality: u8,
8934}
8935impl CELLULAR_STATUS_DATA {
8936    pub const ENCODED_LEN: usize = 10usize;
8937    pub const DEFAULT: Self = Self {
8938        mcc: 0_u16,
8939        mnc: 0_u16,
8940        lac: 0_u16,
8941        status: CellularStatusFlag::DEFAULT,
8942        failure_reason: CellularNetworkFailedReason::DEFAULT,
8943        mavtype: CellularNetworkRadioType::DEFAULT,
8944        quality: 0_u8,
8945    };
8946    #[cfg(feature = "arbitrary")]
8947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8948        use arbitrary::{Arbitrary, Unstructured};
8949        let mut buf = [0u8; 1024];
8950        rng.fill_bytes(&mut buf);
8951        let mut unstructured = Unstructured::new(&buf);
8952        Self::arbitrary(&mut unstructured).unwrap_or_default()
8953    }
8954}
8955impl Default for CELLULAR_STATUS_DATA {
8956    fn default() -> Self {
8957        Self::DEFAULT.clone()
8958    }
8959}
8960impl MessageData for CELLULAR_STATUS_DATA {
8961    type Message = MavMessage;
8962    const ID: u32 = 334u32;
8963    const NAME: &'static str = "CELLULAR_STATUS";
8964    const EXTRA_CRC: u8 = 72u8;
8965    const ENCODED_LEN: usize = 10usize;
8966    fn deser(
8967        _version: MavlinkVersion,
8968        __input: &[u8],
8969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8970        let avail_len = __input.len();
8971        let mut payload_buf = [0; Self::ENCODED_LEN];
8972        let mut buf = if avail_len < Self::ENCODED_LEN {
8973            payload_buf[0..avail_len].copy_from_slice(__input);
8974            Bytes::new(&payload_buf)
8975        } else {
8976            Bytes::new(__input)
8977        };
8978        let mut __struct = Self::default();
8979        __struct.mcc = buf.get_u16_le();
8980        __struct.mnc = buf.get_u16_le();
8981        __struct.lac = buf.get_u16_le();
8982        let tmp = buf.get_u8();
8983        __struct.status =
8984            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8985                enum_type: "CellularStatusFlag",
8986                value: tmp as u32,
8987            })?;
8988        let tmp = buf.get_u8();
8989        __struct.failure_reason =
8990            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8991                enum_type: "CellularNetworkFailedReason",
8992                value: tmp as u32,
8993            })?;
8994        let tmp = buf.get_u8();
8995        __struct.mavtype =
8996            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8997                enum_type: "CellularNetworkRadioType",
8998                value: tmp as u32,
8999            })?;
9000        __struct.quality = buf.get_u8();
9001        Ok(__struct)
9002    }
9003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9004        let mut __tmp = BytesMut::new(bytes);
9005        #[allow(clippy::absurd_extreme_comparisons)]
9006        #[allow(unused_comparisons)]
9007        if __tmp.remaining() < Self::ENCODED_LEN {
9008            panic!(
9009                "buffer is too small (need {} bytes, but got {})",
9010                Self::ENCODED_LEN,
9011                __tmp.remaining(),
9012            )
9013        }
9014        __tmp.put_u16_le(self.mcc);
9015        __tmp.put_u16_le(self.mnc);
9016        __tmp.put_u16_le(self.lac);
9017        __tmp.put_u8(self.status as u8);
9018        __tmp.put_u8(self.failure_reason as u8);
9019        __tmp.put_u8(self.mavtype as u8);
9020        __tmp.put_u8(self.quality);
9021        if matches!(version, MavlinkVersion::V2) {
9022            let len = __tmp.len();
9023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9024        } else {
9025            __tmp.len()
9026        }
9027    }
9028}
9029#[doc = "Request to control this MAV."]
9030#[doc = ""]
9031#[doc = "ID: 5"]
9032#[derive(Debug, Clone, PartialEq)]
9033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9035#[cfg_attr(feature = "ts", derive(TS))]
9036#[cfg_attr(feature = "ts", ts(export))]
9037pub struct CHANGE_OPERATOR_CONTROL_DATA {
9038    #[doc = "System the GCS requests control for"]
9039    pub target_system: u8,
9040    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9041    pub control_request: u8,
9042    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9043    pub version: u8,
9044    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9046    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9047    pub passkey: [u8; 25],
9048}
9049impl CHANGE_OPERATOR_CONTROL_DATA {
9050    pub const ENCODED_LEN: usize = 28usize;
9051    pub const DEFAULT: Self = Self {
9052        target_system: 0_u8,
9053        control_request: 0_u8,
9054        version: 0_u8,
9055        passkey: [0_u8; 25usize],
9056    };
9057    #[cfg(feature = "arbitrary")]
9058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9059        use arbitrary::{Arbitrary, Unstructured};
9060        let mut buf = [0u8; 1024];
9061        rng.fill_bytes(&mut buf);
9062        let mut unstructured = Unstructured::new(&buf);
9063        Self::arbitrary(&mut unstructured).unwrap_or_default()
9064    }
9065}
9066impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9067    fn default() -> Self {
9068        Self::DEFAULT.clone()
9069    }
9070}
9071impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9072    type Message = MavMessage;
9073    const ID: u32 = 5u32;
9074    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9075    const EXTRA_CRC: u8 = 217u8;
9076    const ENCODED_LEN: usize = 28usize;
9077    fn deser(
9078        _version: MavlinkVersion,
9079        __input: &[u8],
9080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9081        let avail_len = __input.len();
9082        let mut payload_buf = [0; Self::ENCODED_LEN];
9083        let mut buf = if avail_len < Self::ENCODED_LEN {
9084            payload_buf[0..avail_len].copy_from_slice(__input);
9085            Bytes::new(&payload_buf)
9086        } else {
9087            Bytes::new(__input)
9088        };
9089        let mut __struct = Self::default();
9090        __struct.target_system = buf.get_u8();
9091        __struct.control_request = buf.get_u8();
9092        __struct.version = buf.get_u8();
9093        for v in &mut __struct.passkey {
9094            let val = buf.get_u8();
9095            *v = val;
9096        }
9097        Ok(__struct)
9098    }
9099    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9100        let mut __tmp = BytesMut::new(bytes);
9101        #[allow(clippy::absurd_extreme_comparisons)]
9102        #[allow(unused_comparisons)]
9103        if __tmp.remaining() < Self::ENCODED_LEN {
9104            panic!(
9105                "buffer is too small (need {} bytes, but got {})",
9106                Self::ENCODED_LEN,
9107                __tmp.remaining(),
9108            )
9109        }
9110        __tmp.put_u8(self.target_system);
9111        __tmp.put_u8(self.control_request);
9112        __tmp.put_u8(self.version);
9113        for val in &self.passkey {
9114            __tmp.put_u8(*val);
9115        }
9116        if matches!(version, MavlinkVersion::V2) {
9117            let len = __tmp.len();
9118            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9119        } else {
9120            __tmp.len()
9121        }
9122    }
9123}
9124#[doc = "Accept / deny control of this MAV."]
9125#[doc = ""]
9126#[doc = "ID: 6"]
9127#[derive(Debug, Clone, PartialEq)]
9128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9130#[cfg_attr(feature = "ts", derive(TS))]
9131#[cfg_attr(feature = "ts", ts(export))]
9132pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9133    #[doc = "ID of the GCS this message"]
9134    pub gcs_system_id: u8,
9135    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9136    pub control_request: u8,
9137    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9138    pub ack: u8,
9139}
9140impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9141    pub const ENCODED_LEN: usize = 3usize;
9142    pub const DEFAULT: Self = Self {
9143        gcs_system_id: 0_u8,
9144        control_request: 0_u8,
9145        ack: 0_u8,
9146    };
9147    #[cfg(feature = "arbitrary")]
9148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9149        use arbitrary::{Arbitrary, Unstructured};
9150        let mut buf = [0u8; 1024];
9151        rng.fill_bytes(&mut buf);
9152        let mut unstructured = Unstructured::new(&buf);
9153        Self::arbitrary(&mut unstructured).unwrap_or_default()
9154    }
9155}
9156impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9157    fn default() -> Self {
9158        Self::DEFAULT.clone()
9159    }
9160}
9161impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9162    type Message = MavMessage;
9163    const ID: u32 = 6u32;
9164    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9165    const EXTRA_CRC: u8 = 104u8;
9166    const ENCODED_LEN: usize = 3usize;
9167    fn deser(
9168        _version: MavlinkVersion,
9169        __input: &[u8],
9170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9171        let avail_len = __input.len();
9172        let mut payload_buf = [0; Self::ENCODED_LEN];
9173        let mut buf = if avail_len < Self::ENCODED_LEN {
9174            payload_buf[0..avail_len].copy_from_slice(__input);
9175            Bytes::new(&payload_buf)
9176        } else {
9177            Bytes::new(__input)
9178        };
9179        let mut __struct = Self::default();
9180        __struct.gcs_system_id = buf.get_u8();
9181        __struct.control_request = buf.get_u8();
9182        __struct.ack = buf.get_u8();
9183        Ok(__struct)
9184    }
9185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9186        let mut __tmp = BytesMut::new(bytes);
9187        #[allow(clippy::absurd_extreme_comparisons)]
9188        #[allow(unused_comparisons)]
9189        if __tmp.remaining() < Self::ENCODED_LEN {
9190            panic!(
9191                "buffer is too small (need {} bytes, but got {})",
9192                Self::ENCODED_LEN,
9193                __tmp.remaining(),
9194            )
9195        }
9196        __tmp.put_u8(self.gcs_system_id);
9197        __tmp.put_u8(self.control_request);
9198        __tmp.put_u8(self.ack);
9199        if matches!(version, MavlinkVersion::V2) {
9200            let len = __tmp.len();
9201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9202        } else {
9203            __tmp.len()
9204        }
9205    }
9206}
9207#[doc = "Information about a potential collision."]
9208#[doc = ""]
9209#[doc = "ID: 247"]
9210#[derive(Debug, Clone, PartialEq)]
9211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9213#[cfg_attr(feature = "ts", derive(TS))]
9214#[cfg_attr(feature = "ts", ts(export))]
9215pub struct COLLISION_DATA {
9216    #[doc = "Unique identifier, domain based on src field"]
9217    pub id: u32,
9218    #[doc = "Estimated time until collision occurs"]
9219    pub time_to_minimum_delta: f32,
9220    #[doc = "Closest vertical distance between vehicle and object"]
9221    pub altitude_minimum_delta: f32,
9222    #[doc = "Closest horizontal distance between vehicle and object"]
9223    pub horizontal_minimum_delta: f32,
9224    #[doc = "Collision data source"]
9225    pub src: MavCollisionSrc,
9226    #[doc = "Action that is being taken to avoid this collision"]
9227    pub action: MavCollisionAction,
9228    #[doc = "How concerned the aircraft is about this collision"]
9229    pub threat_level: MavCollisionThreatLevel,
9230}
9231impl COLLISION_DATA {
9232    pub const ENCODED_LEN: usize = 19usize;
9233    pub const DEFAULT: Self = Self {
9234        id: 0_u32,
9235        time_to_minimum_delta: 0.0_f32,
9236        altitude_minimum_delta: 0.0_f32,
9237        horizontal_minimum_delta: 0.0_f32,
9238        src: MavCollisionSrc::DEFAULT,
9239        action: MavCollisionAction::DEFAULT,
9240        threat_level: MavCollisionThreatLevel::DEFAULT,
9241    };
9242    #[cfg(feature = "arbitrary")]
9243    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9244        use arbitrary::{Arbitrary, Unstructured};
9245        let mut buf = [0u8; 1024];
9246        rng.fill_bytes(&mut buf);
9247        let mut unstructured = Unstructured::new(&buf);
9248        Self::arbitrary(&mut unstructured).unwrap_or_default()
9249    }
9250}
9251impl Default for COLLISION_DATA {
9252    fn default() -> Self {
9253        Self::DEFAULT.clone()
9254    }
9255}
9256impl MessageData for COLLISION_DATA {
9257    type Message = MavMessage;
9258    const ID: u32 = 247u32;
9259    const NAME: &'static str = "COLLISION";
9260    const EXTRA_CRC: u8 = 81u8;
9261    const ENCODED_LEN: usize = 19usize;
9262    fn deser(
9263        _version: MavlinkVersion,
9264        __input: &[u8],
9265    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9266        let avail_len = __input.len();
9267        let mut payload_buf = [0; Self::ENCODED_LEN];
9268        let mut buf = if avail_len < Self::ENCODED_LEN {
9269            payload_buf[0..avail_len].copy_from_slice(__input);
9270            Bytes::new(&payload_buf)
9271        } else {
9272            Bytes::new(__input)
9273        };
9274        let mut __struct = Self::default();
9275        __struct.id = buf.get_u32_le();
9276        __struct.time_to_minimum_delta = buf.get_f32_le();
9277        __struct.altitude_minimum_delta = buf.get_f32_le();
9278        __struct.horizontal_minimum_delta = buf.get_f32_le();
9279        let tmp = buf.get_u8();
9280        __struct.src =
9281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9282                enum_type: "MavCollisionSrc",
9283                value: tmp as u32,
9284            })?;
9285        let tmp = buf.get_u8();
9286        __struct.action =
9287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9288                enum_type: "MavCollisionAction",
9289                value: tmp as u32,
9290            })?;
9291        let tmp = buf.get_u8();
9292        __struct.threat_level =
9293            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9294                enum_type: "MavCollisionThreatLevel",
9295                value: tmp as u32,
9296            })?;
9297        Ok(__struct)
9298    }
9299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9300        let mut __tmp = BytesMut::new(bytes);
9301        #[allow(clippy::absurd_extreme_comparisons)]
9302        #[allow(unused_comparisons)]
9303        if __tmp.remaining() < Self::ENCODED_LEN {
9304            panic!(
9305                "buffer is too small (need {} bytes, but got {})",
9306                Self::ENCODED_LEN,
9307                __tmp.remaining(),
9308            )
9309        }
9310        __tmp.put_u32_le(self.id);
9311        __tmp.put_f32_le(self.time_to_minimum_delta);
9312        __tmp.put_f32_le(self.altitude_minimum_delta);
9313        __tmp.put_f32_le(self.horizontal_minimum_delta);
9314        __tmp.put_u8(self.src as u8);
9315        __tmp.put_u8(self.action as u8);
9316        __tmp.put_u8(self.threat_level as u8);
9317        if matches!(version, MavlinkVersion::V2) {
9318            let len = __tmp.len();
9319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9320        } else {
9321            __tmp.len()
9322        }
9323    }
9324}
9325#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9326#[doc = ""]
9327#[doc = "ID: 77"]
9328#[derive(Debug, Clone, PartialEq)]
9329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9331#[cfg_attr(feature = "ts", derive(TS))]
9332#[cfg_attr(feature = "ts", ts(export))]
9333pub struct COMMAND_ACK_DATA {
9334    #[doc = "Command ID (of acknowledged command)."]
9335    pub command: MavCmd,
9336    #[doc = "Result of command."]
9337    pub result: MavResult,
9338    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9339    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9340    pub progress: u8,
9341    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9342    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9343    pub result_param2: i32,
9344    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9346    pub target_system: u8,
9347    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9348    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9349    pub target_component: u8,
9350}
9351impl COMMAND_ACK_DATA {
9352    pub const ENCODED_LEN: usize = 10usize;
9353    pub const DEFAULT: Self = Self {
9354        command: MavCmd::DEFAULT,
9355        result: MavResult::DEFAULT,
9356        progress: 0_u8,
9357        result_param2: 0_i32,
9358        target_system: 0_u8,
9359        target_component: 0_u8,
9360    };
9361    #[cfg(feature = "arbitrary")]
9362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9363        use arbitrary::{Arbitrary, Unstructured};
9364        let mut buf = [0u8; 1024];
9365        rng.fill_bytes(&mut buf);
9366        let mut unstructured = Unstructured::new(&buf);
9367        Self::arbitrary(&mut unstructured).unwrap_or_default()
9368    }
9369}
9370impl Default for COMMAND_ACK_DATA {
9371    fn default() -> Self {
9372        Self::DEFAULT.clone()
9373    }
9374}
9375impl MessageData for COMMAND_ACK_DATA {
9376    type Message = MavMessage;
9377    const ID: u32 = 77u32;
9378    const NAME: &'static str = "COMMAND_ACK";
9379    const EXTRA_CRC: u8 = 143u8;
9380    const ENCODED_LEN: usize = 10usize;
9381    fn deser(
9382        _version: MavlinkVersion,
9383        __input: &[u8],
9384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9385        let avail_len = __input.len();
9386        let mut payload_buf = [0; Self::ENCODED_LEN];
9387        let mut buf = if avail_len < Self::ENCODED_LEN {
9388            payload_buf[0..avail_len].copy_from_slice(__input);
9389            Bytes::new(&payload_buf)
9390        } else {
9391            Bytes::new(__input)
9392        };
9393        let mut __struct = Self::default();
9394        let tmp = buf.get_u16_le();
9395        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9396            ::mavlink_core::error::ParserError::InvalidEnum {
9397                enum_type: "MavCmd",
9398                value: tmp as u32,
9399            },
9400        )?;
9401        let tmp = buf.get_u8();
9402        __struct.result =
9403            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9404                enum_type: "MavResult",
9405                value: tmp as u32,
9406            })?;
9407        __struct.progress = buf.get_u8();
9408        __struct.result_param2 = buf.get_i32_le();
9409        __struct.target_system = buf.get_u8();
9410        __struct.target_component = buf.get_u8();
9411        Ok(__struct)
9412    }
9413    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9414        let mut __tmp = BytesMut::new(bytes);
9415        #[allow(clippy::absurd_extreme_comparisons)]
9416        #[allow(unused_comparisons)]
9417        if __tmp.remaining() < Self::ENCODED_LEN {
9418            panic!(
9419                "buffer is too small (need {} bytes, but got {})",
9420                Self::ENCODED_LEN,
9421                __tmp.remaining(),
9422            )
9423        }
9424        __tmp.put_u16_le(self.command as u16);
9425        __tmp.put_u8(self.result as u8);
9426        if matches!(version, MavlinkVersion::V2) {
9427            __tmp.put_u8(self.progress);
9428            __tmp.put_i32_le(self.result_param2);
9429            __tmp.put_u8(self.target_system);
9430            __tmp.put_u8(self.target_component);
9431            let len = __tmp.len();
9432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9433        } else {
9434            __tmp.len()
9435        }
9436    }
9437}
9438#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9439#[doc = ""]
9440#[doc = "ID: 80"]
9441#[derive(Debug, Clone, PartialEq)]
9442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9444#[cfg_attr(feature = "ts", derive(TS))]
9445#[cfg_attr(feature = "ts", ts(export))]
9446pub struct COMMAND_CANCEL_DATA {
9447    #[doc = "Command ID (of command to cancel)."]
9448    pub command: MavCmd,
9449    #[doc = "System executing long running command. Should not be broadcast (0)."]
9450    pub target_system: u8,
9451    #[doc = "Component executing long running command."]
9452    pub target_component: u8,
9453}
9454impl COMMAND_CANCEL_DATA {
9455    pub const ENCODED_LEN: usize = 4usize;
9456    pub const DEFAULT: Self = Self {
9457        command: MavCmd::DEFAULT,
9458        target_system: 0_u8,
9459        target_component: 0_u8,
9460    };
9461    #[cfg(feature = "arbitrary")]
9462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9463        use arbitrary::{Arbitrary, Unstructured};
9464        let mut buf = [0u8; 1024];
9465        rng.fill_bytes(&mut buf);
9466        let mut unstructured = Unstructured::new(&buf);
9467        Self::arbitrary(&mut unstructured).unwrap_or_default()
9468    }
9469}
9470impl Default for COMMAND_CANCEL_DATA {
9471    fn default() -> Self {
9472        Self::DEFAULT.clone()
9473    }
9474}
9475impl MessageData for COMMAND_CANCEL_DATA {
9476    type Message = MavMessage;
9477    const ID: u32 = 80u32;
9478    const NAME: &'static str = "COMMAND_CANCEL";
9479    const EXTRA_CRC: u8 = 14u8;
9480    const ENCODED_LEN: usize = 4usize;
9481    fn deser(
9482        _version: MavlinkVersion,
9483        __input: &[u8],
9484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9485        let avail_len = __input.len();
9486        let mut payload_buf = [0; Self::ENCODED_LEN];
9487        let mut buf = if avail_len < Self::ENCODED_LEN {
9488            payload_buf[0..avail_len].copy_from_slice(__input);
9489            Bytes::new(&payload_buf)
9490        } else {
9491            Bytes::new(__input)
9492        };
9493        let mut __struct = Self::default();
9494        let tmp = buf.get_u16_le();
9495        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9496            ::mavlink_core::error::ParserError::InvalidEnum {
9497                enum_type: "MavCmd",
9498                value: tmp as u32,
9499            },
9500        )?;
9501        __struct.target_system = buf.get_u8();
9502        __struct.target_component = buf.get_u8();
9503        Ok(__struct)
9504    }
9505    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9506        let mut __tmp = BytesMut::new(bytes);
9507        #[allow(clippy::absurd_extreme_comparisons)]
9508        #[allow(unused_comparisons)]
9509        if __tmp.remaining() < Self::ENCODED_LEN {
9510            panic!(
9511                "buffer is too small (need {} bytes, but got {})",
9512                Self::ENCODED_LEN,
9513                __tmp.remaining(),
9514            )
9515        }
9516        __tmp.put_u16_le(self.command as u16);
9517        __tmp.put_u8(self.target_system);
9518        __tmp.put_u8(self.target_component);
9519        if matches!(version, MavlinkVersion::V2) {
9520            let len = __tmp.len();
9521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9522        } else {
9523            __tmp.len()
9524        }
9525    }
9526}
9527#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9528#[doc = ""]
9529#[doc = "ID: 75"]
9530#[derive(Debug, Clone, PartialEq)]
9531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9533#[cfg_attr(feature = "ts", derive(TS))]
9534#[cfg_attr(feature = "ts", ts(export))]
9535pub struct COMMAND_INT_DATA {
9536    #[doc = "PARAM1, see MAV_CMD enum"]
9537    pub param1: f32,
9538    #[doc = "PARAM2, see MAV_CMD enum"]
9539    pub param2: f32,
9540    #[doc = "PARAM3, see MAV_CMD enum"]
9541    pub param3: f32,
9542    #[doc = "PARAM4, see MAV_CMD enum"]
9543    pub param4: f32,
9544    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9545    pub x: i32,
9546    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9547    pub y: i32,
9548    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9549    pub z: f32,
9550    #[doc = "The scheduled action for the mission item."]
9551    pub command: MavCmd,
9552    #[doc = "System ID"]
9553    pub target_system: u8,
9554    #[doc = "Component ID"]
9555    pub target_component: u8,
9556    #[doc = "The coordinate system of the COMMAND."]
9557    pub frame: MavFrame,
9558    #[doc = "Not used."]
9559    pub current: u8,
9560    #[doc = "Not used (set 0)."]
9561    pub autocontinue: u8,
9562}
9563impl COMMAND_INT_DATA {
9564    pub const ENCODED_LEN: usize = 35usize;
9565    pub const DEFAULT: Self = Self {
9566        param1: 0.0_f32,
9567        param2: 0.0_f32,
9568        param3: 0.0_f32,
9569        param4: 0.0_f32,
9570        x: 0_i32,
9571        y: 0_i32,
9572        z: 0.0_f32,
9573        command: MavCmd::DEFAULT,
9574        target_system: 0_u8,
9575        target_component: 0_u8,
9576        frame: MavFrame::DEFAULT,
9577        current: 0_u8,
9578        autocontinue: 0_u8,
9579    };
9580    #[cfg(feature = "arbitrary")]
9581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9582        use arbitrary::{Arbitrary, Unstructured};
9583        let mut buf = [0u8; 1024];
9584        rng.fill_bytes(&mut buf);
9585        let mut unstructured = Unstructured::new(&buf);
9586        Self::arbitrary(&mut unstructured).unwrap_or_default()
9587    }
9588}
9589impl Default for COMMAND_INT_DATA {
9590    fn default() -> Self {
9591        Self::DEFAULT.clone()
9592    }
9593}
9594impl MessageData for COMMAND_INT_DATA {
9595    type Message = MavMessage;
9596    const ID: u32 = 75u32;
9597    const NAME: &'static str = "COMMAND_INT";
9598    const EXTRA_CRC: u8 = 158u8;
9599    const ENCODED_LEN: usize = 35usize;
9600    fn deser(
9601        _version: MavlinkVersion,
9602        __input: &[u8],
9603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9604        let avail_len = __input.len();
9605        let mut payload_buf = [0; Self::ENCODED_LEN];
9606        let mut buf = if avail_len < Self::ENCODED_LEN {
9607            payload_buf[0..avail_len].copy_from_slice(__input);
9608            Bytes::new(&payload_buf)
9609        } else {
9610            Bytes::new(__input)
9611        };
9612        let mut __struct = Self::default();
9613        __struct.param1 = buf.get_f32_le();
9614        __struct.param2 = buf.get_f32_le();
9615        __struct.param3 = buf.get_f32_le();
9616        __struct.param4 = buf.get_f32_le();
9617        __struct.x = buf.get_i32_le();
9618        __struct.y = buf.get_i32_le();
9619        __struct.z = buf.get_f32_le();
9620        let tmp = buf.get_u16_le();
9621        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9622            ::mavlink_core::error::ParserError::InvalidEnum {
9623                enum_type: "MavCmd",
9624                value: tmp as u32,
9625            },
9626        )?;
9627        __struct.target_system = buf.get_u8();
9628        __struct.target_component = buf.get_u8();
9629        let tmp = buf.get_u8();
9630        __struct.frame =
9631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9632                enum_type: "MavFrame",
9633                value: tmp as u32,
9634            })?;
9635        __struct.current = buf.get_u8();
9636        __struct.autocontinue = buf.get_u8();
9637        Ok(__struct)
9638    }
9639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9640        let mut __tmp = BytesMut::new(bytes);
9641        #[allow(clippy::absurd_extreme_comparisons)]
9642        #[allow(unused_comparisons)]
9643        if __tmp.remaining() < Self::ENCODED_LEN {
9644            panic!(
9645                "buffer is too small (need {} bytes, but got {})",
9646                Self::ENCODED_LEN,
9647                __tmp.remaining(),
9648            )
9649        }
9650        __tmp.put_f32_le(self.param1);
9651        __tmp.put_f32_le(self.param2);
9652        __tmp.put_f32_le(self.param3);
9653        __tmp.put_f32_le(self.param4);
9654        __tmp.put_i32_le(self.x);
9655        __tmp.put_i32_le(self.y);
9656        __tmp.put_f32_le(self.z);
9657        __tmp.put_u16_le(self.command as u16);
9658        __tmp.put_u8(self.target_system);
9659        __tmp.put_u8(self.target_component);
9660        __tmp.put_u8(self.frame as u8);
9661        __tmp.put_u8(self.current);
9662        __tmp.put_u8(self.autocontinue);
9663        if matches!(version, MavlinkVersion::V2) {
9664            let len = __tmp.len();
9665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9666        } else {
9667            __tmp.len()
9668        }
9669    }
9670}
9671#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9672#[doc = ""]
9673#[doc = "ID: 76"]
9674#[derive(Debug, Clone, PartialEq)]
9675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9677#[cfg_attr(feature = "ts", derive(TS))]
9678#[cfg_attr(feature = "ts", ts(export))]
9679pub struct COMMAND_LONG_DATA {
9680    #[doc = "Parameter 1 (for the specific command)."]
9681    pub param1: f32,
9682    #[doc = "Parameter 2 (for the specific command)."]
9683    pub param2: f32,
9684    #[doc = "Parameter 3 (for the specific command)."]
9685    pub param3: f32,
9686    #[doc = "Parameter 4 (for the specific command)."]
9687    pub param4: f32,
9688    #[doc = "Parameter 5 (for the specific command)."]
9689    pub param5: f32,
9690    #[doc = "Parameter 6 (for the specific command)."]
9691    pub param6: f32,
9692    #[doc = "Parameter 7 (for the specific command)."]
9693    pub param7: f32,
9694    #[doc = "Command ID (of command to send)."]
9695    pub command: MavCmd,
9696    #[doc = "System which should execute the command"]
9697    pub target_system: u8,
9698    #[doc = "Component which should execute the command, 0 for all components"]
9699    pub target_component: u8,
9700    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9701    pub confirmation: u8,
9702}
9703impl COMMAND_LONG_DATA {
9704    pub const ENCODED_LEN: usize = 33usize;
9705    pub const DEFAULT: Self = Self {
9706        param1: 0.0_f32,
9707        param2: 0.0_f32,
9708        param3: 0.0_f32,
9709        param4: 0.0_f32,
9710        param5: 0.0_f32,
9711        param6: 0.0_f32,
9712        param7: 0.0_f32,
9713        command: MavCmd::DEFAULT,
9714        target_system: 0_u8,
9715        target_component: 0_u8,
9716        confirmation: 0_u8,
9717    };
9718    #[cfg(feature = "arbitrary")]
9719    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9720        use arbitrary::{Arbitrary, Unstructured};
9721        let mut buf = [0u8; 1024];
9722        rng.fill_bytes(&mut buf);
9723        let mut unstructured = Unstructured::new(&buf);
9724        Self::arbitrary(&mut unstructured).unwrap_or_default()
9725    }
9726}
9727impl Default for COMMAND_LONG_DATA {
9728    fn default() -> Self {
9729        Self::DEFAULT.clone()
9730    }
9731}
9732impl MessageData for COMMAND_LONG_DATA {
9733    type Message = MavMessage;
9734    const ID: u32 = 76u32;
9735    const NAME: &'static str = "COMMAND_LONG";
9736    const EXTRA_CRC: u8 = 152u8;
9737    const ENCODED_LEN: usize = 33usize;
9738    fn deser(
9739        _version: MavlinkVersion,
9740        __input: &[u8],
9741    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9742        let avail_len = __input.len();
9743        let mut payload_buf = [0; Self::ENCODED_LEN];
9744        let mut buf = if avail_len < Self::ENCODED_LEN {
9745            payload_buf[0..avail_len].copy_from_slice(__input);
9746            Bytes::new(&payload_buf)
9747        } else {
9748            Bytes::new(__input)
9749        };
9750        let mut __struct = Self::default();
9751        __struct.param1 = buf.get_f32_le();
9752        __struct.param2 = buf.get_f32_le();
9753        __struct.param3 = buf.get_f32_le();
9754        __struct.param4 = buf.get_f32_le();
9755        __struct.param5 = buf.get_f32_le();
9756        __struct.param6 = buf.get_f32_le();
9757        __struct.param7 = buf.get_f32_le();
9758        let tmp = buf.get_u16_le();
9759        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9760            ::mavlink_core::error::ParserError::InvalidEnum {
9761                enum_type: "MavCmd",
9762                value: tmp as u32,
9763            },
9764        )?;
9765        __struct.target_system = buf.get_u8();
9766        __struct.target_component = buf.get_u8();
9767        __struct.confirmation = buf.get_u8();
9768        Ok(__struct)
9769    }
9770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9771        let mut __tmp = BytesMut::new(bytes);
9772        #[allow(clippy::absurd_extreme_comparisons)]
9773        #[allow(unused_comparisons)]
9774        if __tmp.remaining() < Self::ENCODED_LEN {
9775            panic!(
9776                "buffer is too small (need {} bytes, but got {})",
9777                Self::ENCODED_LEN,
9778                __tmp.remaining(),
9779            )
9780        }
9781        __tmp.put_f32_le(self.param1);
9782        __tmp.put_f32_le(self.param2);
9783        __tmp.put_f32_le(self.param3);
9784        __tmp.put_f32_le(self.param4);
9785        __tmp.put_f32_le(self.param5);
9786        __tmp.put_f32_le(self.param6);
9787        __tmp.put_f32_le(self.param7);
9788        __tmp.put_u16_le(self.command as u16);
9789        __tmp.put_u8(self.target_system);
9790        __tmp.put_u8(self.target_component);
9791        __tmp.put_u8(self.confirmation);
9792        if matches!(version, MavlinkVersion::V2) {
9793            let len = __tmp.len();
9794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9795        } else {
9796            __tmp.len()
9797        }
9798    }
9799}
9800#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9801#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9802#[doc = ""]
9803#[doc = "ID: 395"]
9804#[derive(Debug, Clone, PartialEq)]
9805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9807#[cfg_attr(feature = "ts", derive(TS))]
9808#[cfg_attr(feature = "ts", ts(export))]
9809pub struct COMPONENT_INFORMATION_DATA {
9810    #[doc = "Timestamp (time since system boot)."]
9811    pub time_boot_ms: u32,
9812    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9813    pub general_metadata_file_crc: u32,
9814    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9815    pub peripherals_metadata_file_crc: u32,
9816    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9817    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9818    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9819    pub general_metadata_uri: [u8; 100],
9820    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9821    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9822    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9823    pub peripherals_metadata_uri: [u8; 100],
9824}
9825impl COMPONENT_INFORMATION_DATA {
9826    pub const ENCODED_LEN: usize = 212usize;
9827    pub const DEFAULT: Self = Self {
9828        time_boot_ms: 0_u32,
9829        general_metadata_file_crc: 0_u32,
9830        peripherals_metadata_file_crc: 0_u32,
9831        general_metadata_uri: [0_u8; 100usize],
9832        peripherals_metadata_uri: [0_u8; 100usize],
9833    };
9834    #[cfg(feature = "arbitrary")]
9835    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9836        use arbitrary::{Arbitrary, Unstructured};
9837        let mut buf = [0u8; 1024];
9838        rng.fill_bytes(&mut buf);
9839        let mut unstructured = Unstructured::new(&buf);
9840        Self::arbitrary(&mut unstructured).unwrap_or_default()
9841    }
9842}
9843impl Default for COMPONENT_INFORMATION_DATA {
9844    fn default() -> Self {
9845        Self::DEFAULT.clone()
9846    }
9847}
9848impl MessageData for COMPONENT_INFORMATION_DATA {
9849    type Message = MavMessage;
9850    const ID: u32 = 395u32;
9851    const NAME: &'static str = "COMPONENT_INFORMATION";
9852    const EXTRA_CRC: u8 = 0u8;
9853    const ENCODED_LEN: usize = 212usize;
9854    fn deser(
9855        _version: MavlinkVersion,
9856        __input: &[u8],
9857    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9858        let avail_len = __input.len();
9859        let mut payload_buf = [0; Self::ENCODED_LEN];
9860        let mut buf = if avail_len < Self::ENCODED_LEN {
9861            payload_buf[0..avail_len].copy_from_slice(__input);
9862            Bytes::new(&payload_buf)
9863        } else {
9864            Bytes::new(__input)
9865        };
9866        let mut __struct = Self::default();
9867        __struct.time_boot_ms = buf.get_u32_le();
9868        __struct.general_metadata_file_crc = buf.get_u32_le();
9869        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9870        for v in &mut __struct.general_metadata_uri {
9871            let val = buf.get_u8();
9872            *v = val;
9873        }
9874        for v in &mut __struct.peripherals_metadata_uri {
9875            let val = buf.get_u8();
9876            *v = val;
9877        }
9878        Ok(__struct)
9879    }
9880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9881        let mut __tmp = BytesMut::new(bytes);
9882        #[allow(clippy::absurd_extreme_comparisons)]
9883        #[allow(unused_comparisons)]
9884        if __tmp.remaining() < Self::ENCODED_LEN {
9885            panic!(
9886                "buffer is too small (need {} bytes, but got {})",
9887                Self::ENCODED_LEN,
9888                __tmp.remaining(),
9889            )
9890        }
9891        __tmp.put_u32_le(self.time_boot_ms);
9892        __tmp.put_u32_le(self.general_metadata_file_crc);
9893        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9894        for val in &self.general_metadata_uri {
9895            __tmp.put_u8(*val);
9896        }
9897        for val in &self.peripherals_metadata_uri {
9898            __tmp.put_u8(*val);
9899        }
9900        if matches!(version, MavlinkVersion::V2) {
9901            let len = __tmp.len();
9902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9903        } else {
9904            __tmp.len()
9905        }
9906    }
9907}
9908#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9909#[doc = ""]
9910#[doc = "ID: 396"]
9911#[derive(Debug, Clone, PartialEq)]
9912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9914#[cfg_attr(feature = "ts", derive(TS))]
9915#[cfg_attr(feature = "ts", ts(export))]
9916pub struct COMPONENT_INFORMATION_BASIC_DATA {
9917    #[doc = "Component capability flags"]
9918    pub capabilities: MavProtocolCapability,
9919    #[doc = "Timestamp (time since system boot)."]
9920    pub time_boot_ms: u32,
9921    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9922    pub time_manufacture_s: u32,
9923    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9926    pub vendor_name: [u8; 32],
9927    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9930    pub model_name: [u8; 32],
9931    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9933    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9934    pub software_version: [u8; 24],
9935    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9936    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9937    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9938    pub hardware_version: [u8; 24],
9939    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9940    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9941    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9942    pub serial_number: [u8; 32],
9943}
9944impl COMPONENT_INFORMATION_BASIC_DATA {
9945    pub const ENCODED_LEN: usize = 160usize;
9946    pub const DEFAULT: Self = Self {
9947        capabilities: MavProtocolCapability::DEFAULT,
9948        time_boot_ms: 0_u32,
9949        time_manufacture_s: 0_u32,
9950        vendor_name: [0_u8; 32usize],
9951        model_name: [0_u8; 32usize],
9952        software_version: [0_u8; 24usize],
9953        hardware_version: [0_u8; 24usize],
9954        serial_number: [0_u8; 32usize],
9955    };
9956    #[cfg(feature = "arbitrary")]
9957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9958        use arbitrary::{Arbitrary, Unstructured};
9959        let mut buf = [0u8; 1024];
9960        rng.fill_bytes(&mut buf);
9961        let mut unstructured = Unstructured::new(&buf);
9962        Self::arbitrary(&mut unstructured).unwrap_or_default()
9963    }
9964}
9965impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9966    fn default() -> Self {
9967        Self::DEFAULT.clone()
9968    }
9969}
9970impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9971    type Message = MavMessage;
9972    const ID: u32 = 396u32;
9973    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9974    const EXTRA_CRC: u8 = 50u8;
9975    const ENCODED_LEN: usize = 160usize;
9976    fn deser(
9977        _version: MavlinkVersion,
9978        __input: &[u8],
9979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9980        let avail_len = __input.len();
9981        let mut payload_buf = [0; Self::ENCODED_LEN];
9982        let mut buf = if avail_len < Self::ENCODED_LEN {
9983            payload_buf[0..avail_len].copy_from_slice(__input);
9984            Bytes::new(&payload_buf)
9985        } else {
9986            Bytes::new(__input)
9987        };
9988        let mut __struct = Self::default();
9989        let tmp = buf.get_u64_le();
9990        __struct.capabilities = MavProtocolCapability::from_bits(
9991            tmp & MavProtocolCapability::all().bits(),
9992        )
9993        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9994            flag_type: "MavProtocolCapability",
9995            value: tmp as u32,
9996        })?;
9997        __struct.time_boot_ms = buf.get_u32_le();
9998        __struct.time_manufacture_s = buf.get_u32_le();
9999        for v in &mut __struct.vendor_name {
10000            let val = buf.get_u8();
10001            *v = val;
10002        }
10003        for v in &mut __struct.model_name {
10004            let val = buf.get_u8();
10005            *v = val;
10006        }
10007        for v in &mut __struct.software_version {
10008            let val = buf.get_u8();
10009            *v = val;
10010        }
10011        for v in &mut __struct.hardware_version {
10012            let val = buf.get_u8();
10013            *v = val;
10014        }
10015        for v in &mut __struct.serial_number {
10016            let val = buf.get_u8();
10017            *v = val;
10018        }
10019        Ok(__struct)
10020    }
10021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10022        let mut __tmp = BytesMut::new(bytes);
10023        #[allow(clippy::absurd_extreme_comparisons)]
10024        #[allow(unused_comparisons)]
10025        if __tmp.remaining() < Self::ENCODED_LEN {
10026            panic!(
10027                "buffer is too small (need {} bytes, but got {})",
10028                Self::ENCODED_LEN,
10029                __tmp.remaining(),
10030            )
10031        }
10032        __tmp.put_u64_le(self.capabilities.bits());
10033        __tmp.put_u32_le(self.time_boot_ms);
10034        __tmp.put_u32_le(self.time_manufacture_s);
10035        for val in &self.vendor_name {
10036            __tmp.put_u8(*val);
10037        }
10038        for val in &self.model_name {
10039            __tmp.put_u8(*val);
10040        }
10041        for val in &self.software_version {
10042            __tmp.put_u8(*val);
10043        }
10044        for val in &self.hardware_version {
10045            __tmp.put_u8(*val);
10046        }
10047        for val in &self.serial_number {
10048            __tmp.put_u8(*val);
10049        }
10050        if matches!(version, MavlinkVersion::V2) {
10051            let len = __tmp.len();
10052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10053        } else {
10054            __tmp.len()
10055        }
10056    }
10057}
10058#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10059#[doc = ""]
10060#[doc = "ID: 397"]
10061#[derive(Debug, Clone, PartialEq)]
10062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10064#[cfg_attr(feature = "ts", derive(TS))]
10065#[cfg_attr(feature = "ts", ts(export))]
10066pub struct COMPONENT_METADATA_DATA {
10067    #[doc = "Timestamp (time since system boot)."]
10068    pub time_boot_ms: u32,
10069    #[doc = "CRC32 of the general metadata file."]
10070    pub file_crc: u32,
10071    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10072    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10073    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10074    pub uri: [u8; 100],
10075}
10076impl COMPONENT_METADATA_DATA {
10077    pub const ENCODED_LEN: usize = 108usize;
10078    pub const DEFAULT: Self = Self {
10079        time_boot_ms: 0_u32,
10080        file_crc: 0_u32,
10081        uri: [0_u8; 100usize],
10082    };
10083    #[cfg(feature = "arbitrary")]
10084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10085        use arbitrary::{Arbitrary, Unstructured};
10086        let mut buf = [0u8; 1024];
10087        rng.fill_bytes(&mut buf);
10088        let mut unstructured = Unstructured::new(&buf);
10089        Self::arbitrary(&mut unstructured).unwrap_or_default()
10090    }
10091}
10092impl Default for COMPONENT_METADATA_DATA {
10093    fn default() -> Self {
10094        Self::DEFAULT.clone()
10095    }
10096}
10097impl MessageData for COMPONENT_METADATA_DATA {
10098    type Message = MavMessage;
10099    const ID: u32 = 397u32;
10100    const NAME: &'static str = "COMPONENT_METADATA";
10101    const EXTRA_CRC: u8 = 182u8;
10102    const ENCODED_LEN: usize = 108usize;
10103    fn deser(
10104        _version: MavlinkVersion,
10105        __input: &[u8],
10106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10107        let avail_len = __input.len();
10108        let mut payload_buf = [0; Self::ENCODED_LEN];
10109        let mut buf = if avail_len < Self::ENCODED_LEN {
10110            payload_buf[0..avail_len].copy_from_slice(__input);
10111            Bytes::new(&payload_buf)
10112        } else {
10113            Bytes::new(__input)
10114        };
10115        let mut __struct = Self::default();
10116        __struct.time_boot_ms = buf.get_u32_le();
10117        __struct.file_crc = buf.get_u32_le();
10118        for v in &mut __struct.uri {
10119            let val = buf.get_u8();
10120            *v = val;
10121        }
10122        Ok(__struct)
10123    }
10124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10125        let mut __tmp = BytesMut::new(bytes);
10126        #[allow(clippy::absurd_extreme_comparisons)]
10127        #[allow(unused_comparisons)]
10128        if __tmp.remaining() < Self::ENCODED_LEN {
10129            panic!(
10130                "buffer is too small (need {} bytes, but got {})",
10131                Self::ENCODED_LEN,
10132                __tmp.remaining(),
10133            )
10134        }
10135        __tmp.put_u32_le(self.time_boot_ms);
10136        __tmp.put_u32_le(self.file_crc);
10137        for val in &self.uri {
10138            __tmp.put_u8(*val);
10139        }
10140        if matches!(version, MavlinkVersion::V2) {
10141            let len = __tmp.len();
10142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10143        } else {
10144            __tmp.len()
10145        }
10146    }
10147}
10148#[doc = "Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL."]
10149#[doc = ""]
10150#[doc = "ID: 512"]
10151#[derive(Debug, Clone, PartialEq)]
10152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10154#[cfg_attr(feature = "ts", derive(TS))]
10155#[cfg_attr(feature = "ts", ts(export))]
10156pub struct CONTROL_STATUS_DATA {
10157    #[doc = "System ID of GCS MAVLink component in control (0: no GCS in control)."]
10158    pub sysid_in_control: u8,
10159    #[doc = "Control status. For example, whether takeover is allowed, and whether this message instance defines the default controlling GCS for the whole system."]
10160    pub flags: GcsControlStatusFlags,
10161}
10162impl CONTROL_STATUS_DATA {
10163    pub const ENCODED_LEN: usize = 2usize;
10164    pub const DEFAULT: Self = Self {
10165        sysid_in_control: 0_u8,
10166        flags: GcsControlStatusFlags::DEFAULT,
10167    };
10168    #[cfg(feature = "arbitrary")]
10169    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10170        use arbitrary::{Arbitrary, Unstructured};
10171        let mut buf = [0u8; 1024];
10172        rng.fill_bytes(&mut buf);
10173        let mut unstructured = Unstructured::new(&buf);
10174        Self::arbitrary(&mut unstructured).unwrap_or_default()
10175    }
10176}
10177impl Default for CONTROL_STATUS_DATA {
10178    fn default() -> Self {
10179        Self::DEFAULT.clone()
10180    }
10181}
10182impl MessageData for CONTROL_STATUS_DATA {
10183    type Message = MavMessage;
10184    const ID: u32 = 512u32;
10185    const NAME: &'static str = "CONTROL_STATUS";
10186    const EXTRA_CRC: u8 = 184u8;
10187    const ENCODED_LEN: usize = 2usize;
10188    fn deser(
10189        _version: MavlinkVersion,
10190        __input: &[u8],
10191    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10192        let avail_len = __input.len();
10193        let mut payload_buf = [0; Self::ENCODED_LEN];
10194        let mut buf = if avail_len < Self::ENCODED_LEN {
10195            payload_buf[0..avail_len].copy_from_slice(__input);
10196            Bytes::new(&payload_buf)
10197        } else {
10198            Bytes::new(__input)
10199        };
10200        let mut __struct = Self::default();
10201        __struct.sysid_in_control = buf.get_u8();
10202        let tmp = buf.get_u8();
10203        __struct.flags = GcsControlStatusFlags::from_bits(
10204            tmp & GcsControlStatusFlags::all().bits(),
10205        )
10206        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10207            flag_type: "GcsControlStatusFlags",
10208            value: tmp as u32,
10209        })?;
10210        Ok(__struct)
10211    }
10212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10213        let mut __tmp = BytesMut::new(bytes);
10214        #[allow(clippy::absurd_extreme_comparisons)]
10215        #[allow(unused_comparisons)]
10216        if __tmp.remaining() < Self::ENCODED_LEN {
10217            panic!(
10218                "buffer is too small (need {} bytes, but got {})",
10219                Self::ENCODED_LEN,
10220                __tmp.remaining(),
10221            )
10222        }
10223        __tmp.put_u8(self.sysid_in_control);
10224        __tmp.put_u8(self.flags.bits());
10225        if matches!(version, MavlinkVersion::V2) {
10226            let len = __tmp.len();
10227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10228        } else {
10229            __tmp.len()
10230        }
10231    }
10232}
10233#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10234#[doc = ""]
10235#[doc = "ID: 146"]
10236#[derive(Debug, Clone, PartialEq)]
10237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10239#[cfg_attr(feature = "ts", derive(TS))]
10240#[cfg_attr(feature = "ts", ts(export))]
10241pub struct CONTROL_SYSTEM_STATE_DATA {
10242    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10243    pub time_usec: u64,
10244    #[doc = "X acceleration in body frame"]
10245    pub x_acc: f32,
10246    #[doc = "Y acceleration in body frame"]
10247    pub y_acc: f32,
10248    #[doc = "Z acceleration in body frame"]
10249    pub z_acc: f32,
10250    #[doc = "X velocity in body frame"]
10251    pub x_vel: f32,
10252    #[doc = "Y velocity in body frame"]
10253    pub y_vel: f32,
10254    #[doc = "Z velocity in body frame"]
10255    pub z_vel: f32,
10256    #[doc = "X position in local frame"]
10257    pub x_pos: f32,
10258    #[doc = "Y position in local frame"]
10259    pub y_pos: f32,
10260    #[doc = "Z position in local frame"]
10261    pub z_pos: f32,
10262    #[doc = "Airspeed, set to -1 if unknown"]
10263    pub airspeed: f32,
10264    #[doc = "Variance of body velocity estimate"]
10265    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10266    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10267    pub vel_variance: [f32; 3],
10268    #[doc = "Variance in local position"]
10269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10270    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10271    pub pos_variance: [f32; 3],
10272    #[doc = "The attitude, represented as Quaternion"]
10273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10274    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10275    pub q: [f32; 4],
10276    #[doc = "Angular rate in roll axis"]
10277    pub roll_rate: f32,
10278    #[doc = "Angular rate in pitch axis"]
10279    pub pitch_rate: f32,
10280    #[doc = "Angular rate in yaw axis"]
10281    pub yaw_rate: f32,
10282}
10283impl CONTROL_SYSTEM_STATE_DATA {
10284    pub const ENCODED_LEN: usize = 100usize;
10285    pub const DEFAULT: Self = Self {
10286        time_usec: 0_u64,
10287        x_acc: 0.0_f32,
10288        y_acc: 0.0_f32,
10289        z_acc: 0.0_f32,
10290        x_vel: 0.0_f32,
10291        y_vel: 0.0_f32,
10292        z_vel: 0.0_f32,
10293        x_pos: 0.0_f32,
10294        y_pos: 0.0_f32,
10295        z_pos: 0.0_f32,
10296        airspeed: 0.0_f32,
10297        vel_variance: [0.0_f32; 3usize],
10298        pos_variance: [0.0_f32; 3usize],
10299        q: [0.0_f32; 4usize],
10300        roll_rate: 0.0_f32,
10301        pitch_rate: 0.0_f32,
10302        yaw_rate: 0.0_f32,
10303    };
10304    #[cfg(feature = "arbitrary")]
10305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10306        use arbitrary::{Arbitrary, Unstructured};
10307        let mut buf = [0u8; 1024];
10308        rng.fill_bytes(&mut buf);
10309        let mut unstructured = Unstructured::new(&buf);
10310        Self::arbitrary(&mut unstructured).unwrap_or_default()
10311    }
10312}
10313impl Default for CONTROL_SYSTEM_STATE_DATA {
10314    fn default() -> Self {
10315        Self::DEFAULT.clone()
10316    }
10317}
10318impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10319    type Message = MavMessage;
10320    const ID: u32 = 146u32;
10321    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10322    const EXTRA_CRC: u8 = 103u8;
10323    const ENCODED_LEN: usize = 100usize;
10324    fn deser(
10325        _version: MavlinkVersion,
10326        __input: &[u8],
10327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10328        let avail_len = __input.len();
10329        let mut payload_buf = [0; Self::ENCODED_LEN];
10330        let mut buf = if avail_len < Self::ENCODED_LEN {
10331            payload_buf[0..avail_len].copy_from_slice(__input);
10332            Bytes::new(&payload_buf)
10333        } else {
10334            Bytes::new(__input)
10335        };
10336        let mut __struct = Self::default();
10337        __struct.time_usec = buf.get_u64_le();
10338        __struct.x_acc = buf.get_f32_le();
10339        __struct.y_acc = buf.get_f32_le();
10340        __struct.z_acc = buf.get_f32_le();
10341        __struct.x_vel = buf.get_f32_le();
10342        __struct.y_vel = buf.get_f32_le();
10343        __struct.z_vel = buf.get_f32_le();
10344        __struct.x_pos = buf.get_f32_le();
10345        __struct.y_pos = buf.get_f32_le();
10346        __struct.z_pos = buf.get_f32_le();
10347        __struct.airspeed = buf.get_f32_le();
10348        for v in &mut __struct.vel_variance {
10349            let val = buf.get_f32_le();
10350            *v = val;
10351        }
10352        for v in &mut __struct.pos_variance {
10353            let val = buf.get_f32_le();
10354            *v = val;
10355        }
10356        for v in &mut __struct.q {
10357            let val = buf.get_f32_le();
10358            *v = val;
10359        }
10360        __struct.roll_rate = buf.get_f32_le();
10361        __struct.pitch_rate = buf.get_f32_le();
10362        __struct.yaw_rate = buf.get_f32_le();
10363        Ok(__struct)
10364    }
10365    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10366        let mut __tmp = BytesMut::new(bytes);
10367        #[allow(clippy::absurd_extreme_comparisons)]
10368        #[allow(unused_comparisons)]
10369        if __tmp.remaining() < Self::ENCODED_LEN {
10370            panic!(
10371                "buffer is too small (need {} bytes, but got {})",
10372                Self::ENCODED_LEN,
10373                __tmp.remaining(),
10374            )
10375        }
10376        __tmp.put_u64_le(self.time_usec);
10377        __tmp.put_f32_le(self.x_acc);
10378        __tmp.put_f32_le(self.y_acc);
10379        __tmp.put_f32_le(self.z_acc);
10380        __tmp.put_f32_le(self.x_vel);
10381        __tmp.put_f32_le(self.y_vel);
10382        __tmp.put_f32_le(self.z_vel);
10383        __tmp.put_f32_le(self.x_pos);
10384        __tmp.put_f32_le(self.y_pos);
10385        __tmp.put_f32_le(self.z_pos);
10386        __tmp.put_f32_le(self.airspeed);
10387        for val in &self.vel_variance {
10388            __tmp.put_f32_le(*val);
10389        }
10390        for val in &self.pos_variance {
10391            __tmp.put_f32_le(*val);
10392        }
10393        for val in &self.q {
10394            __tmp.put_f32_le(*val);
10395        }
10396        __tmp.put_f32_le(self.roll_rate);
10397        __tmp.put_f32_le(self.pitch_rate);
10398        __tmp.put_f32_le(self.yaw_rate);
10399        if matches!(version, MavlinkVersion::V2) {
10400            let len = __tmp.len();
10401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10402        } else {
10403            __tmp.len()
10404        }
10405    }
10406}
10407#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10408#[doc = ""]
10409#[doc = "ID: 411"]
10410#[derive(Debug, Clone, PartialEq)]
10411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10413#[cfg_attr(feature = "ts", derive(TS))]
10414#[cfg_attr(feature = "ts", ts(export))]
10415pub struct CURRENT_EVENT_SEQUENCE_DATA {
10416    #[doc = "Sequence number."]
10417    pub sequence: u16,
10418    #[doc = "Flag bitset."]
10419    pub flags: MavEventCurrentSequenceFlags,
10420}
10421impl CURRENT_EVENT_SEQUENCE_DATA {
10422    pub const ENCODED_LEN: usize = 3usize;
10423    pub const DEFAULT: Self = Self {
10424        sequence: 0_u16,
10425        flags: MavEventCurrentSequenceFlags::DEFAULT,
10426    };
10427    #[cfg(feature = "arbitrary")]
10428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10429        use arbitrary::{Arbitrary, Unstructured};
10430        let mut buf = [0u8; 1024];
10431        rng.fill_bytes(&mut buf);
10432        let mut unstructured = Unstructured::new(&buf);
10433        Self::arbitrary(&mut unstructured).unwrap_or_default()
10434    }
10435}
10436impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10437    fn default() -> Self {
10438        Self::DEFAULT.clone()
10439    }
10440}
10441impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10442    type Message = MavMessage;
10443    const ID: u32 = 411u32;
10444    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10445    const EXTRA_CRC: u8 = 106u8;
10446    const ENCODED_LEN: usize = 3usize;
10447    fn deser(
10448        _version: MavlinkVersion,
10449        __input: &[u8],
10450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10451        let avail_len = __input.len();
10452        let mut payload_buf = [0; Self::ENCODED_LEN];
10453        let mut buf = if avail_len < Self::ENCODED_LEN {
10454            payload_buf[0..avail_len].copy_from_slice(__input);
10455            Bytes::new(&payload_buf)
10456        } else {
10457            Bytes::new(__input)
10458        };
10459        let mut __struct = Self::default();
10460        __struct.sequence = buf.get_u16_le();
10461        let tmp = buf.get_u8();
10462        __struct.flags =
10463            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10464                enum_type: "MavEventCurrentSequenceFlags",
10465                value: tmp as u32,
10466            })?;
10467        Ok(__struct)
10468    }
10469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10470        let mut __tmp = BytesMut::new(bytes);
10471        #[allow(clippy::absurd_extreme_comparisons)]
10472        #[allow(unused_comparisons)]
10473        if __tmp.remaining() < Self::ENCODED_LEN {
10474            panic!(
10475                "buffer is too small (need {} bytes, but got {})",
10476                Self::ENCODED_LEN,
10477                __tmp.remaining(),
10478            )
10479        }
10480        __tmp.put_u16_le(self.sequence);
10481        __tmp.put_u8(self.flags as u8);
10482        if matches!(version, MavlinkVersion::V2) {
10483            let len = __tmp.len();
10484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10485        } else {
10486            __tmp.len()
10487        }
10488    }
10489}
10490#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10491#[doc = ""]
10492#[doc = "ID: 436"]
10493#[derive(Debug, Clone, PartialEq)]
10494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10496#[cfg_attr(feature = "ts", derive(TS))]
10497#[cfg_attr(feature = "ts", ts(export))]
10498pub struct CURRENT_MODE_DATA {
10499    #[doc = "A bitfield for use for autopilot-specific flags"]
10500    pub custom_mode: u32,
10501    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10502    pub intended_custom_mode: u32,
10503    #[doc = "Standard mode."]
10504    pub standard_mode: MavStandardMode,
10505}
10506impl CURRENT_MODE_DATA {
10507    pub const ENCODED_LEN: usize = 9usize;
10508    pub const DEFAULT: Self = Self {
10509        custom_mode: 0_u32,
10510        intended_custom_mode: 0_u32,
10511        standard_mode: MavStandardMode::DEFAULT,
10512    };
10513    #[cfg(feature = "arbitrary")]
10514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10515        use arbitrary::{Arbitrary, Unstructured};
10516        let mut buf = [0u8; 1024];
10517        rng.fill_bytes(&mut buf);
10518        let mut unstructured = Unstructured::new(&buf);
10519        Self::arbitrary(&mut unstructured).unwrap_or_default()
10520    }
10521}
10522impl Default for CURRENT_MODE_DATA {
10523    fn default() -> Self {
10524        Self::DEFAULT.clone()
10525    }
10526}
10527impl MessageData for CURRENT_MODE_DATA {
10528    type Message = MavMessage;
10529    const ID: u32 = 436u32;
10530    const NAME: &'static str = "CURRENT_MODE";
10531    const EXTRA_CRC: u8 = 193u8;
10532    const ENCODED_LEN: usize = 9usize;
10533    fn deser(
10534        _version: MavlinkVersion,
10535        __input: &[u8],
10536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10537        let avail_len = __input.len();
10538        let mut payload_buf = [0; Self::ENCODED_LEN];
10539        let mut buf = if avail_len < Self::ENCODED_LEN {
10540            payload_buf[0..avail_len].copy_from_slice(__input);
10541            Bytes::new(&payload_buf)
10542        } else {
10543            Bytes::new(__input)
10544        };
10545        let mut __struct = Self::default();
10546        __struct.custom_mode = buf.get_u32_le();
10547        __struct.intended_custom_mode = buf.get_u32_le();
10548        let tmp = buf.get_u8();
10549        __struct.standard_mode =
10550            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10551                enum_type: "MavStandardMode",
10552                value: tmp as u32,
10553            })?;
10554        Ok(__struct)
10555    }
10556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10557        let mut __tmp = BytesMut::new(bytes);
10558        #[allow(clippy::absurd_extreme_comparisons)]
10559        #[allow(unused_comparisons)]
10560        if __tmp.remaining() < Self::ENCODED_LEN {
10561            panic!(
10562                "buffer is too small (need {} bytes, but got {})",
10563                Self::ENCODED_LEN,
10564                __tmp.remaining(),
10565            )
10566        }
10567        __tmp.put_u32_le(self.custom_mode);
10568        __tmp.put_u32_le(self.intended_custom_mode);
10569        __tmp.put_u8(self.standard_mode as u8);
10570        if matches!(version, MavlinkVersion::V2) {
10571            let len = __tmp.len();
10572            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10573        } else {
10574            __tmp.len()
10575        }
10576    }
10577}
10578#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10579#[doc = "Data stream status information."]
10580#[doc = ""]
10581#[doc = "ID: 67"]
10582#[derive(Debug, Clone, PartialEq)]
10583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10585#[cfg_attr(feature = "ts", derive(TS))]
10586#[cfg_attr(feature = "ts", ts(export))]
10587pub struct DATA_STREAM_DATA {
10588    #[doc = "The message rate"]
10589    pub message_rate: u16,
10590    #[doc = "The ID of the requested data stream"]
10591    pub stream_id: u8,
10592    #[doc = "1 stream is enabled, 0 stream is stopped."]
10593    pub on_off: u8,
10594}
10595impl DATA_STREAM_DATA {
10596    pub const ENCODED_LEN: usize = 4usize;
10597    pub const DEFAULT: Self = Self {
10598        message_rate: 0_u16,
10599        stream_id: 0_u8,
10600        on_off: 0_u8,
10601    };
10602    #[cfg(feature = "arbitrary")]
10603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10604        use arbitrary::{Arbitrary, Unstructured};
10605        let mut buf = [0u8; 1024];
10606        rng.fill_bytes(&mut buf);
10607        let mut unstructured = Unstructured::new(&buf);
10608        Self::arbitrary(&mut unstructured).unwrap_or_default()
10609    }
10610}
10611impl Default for DATA_STREAM_DATA {
10612    fn default() -> Self {
10613        Self::DEFAULT.clone()
10614    }
10615}
10616impl MessageData for DATA_STREAM_DATA {
10617    type Message = MavMessage;
10618    const ID: u32 = 67u32;
10619    const NAME: &'static str = "DATA_STREAM";
10620    const EXTRA_CRC: u8 = 21u8;
10621    const ENCODED_LEN: usize = 4usize;
10622    fn deser(
10623        _version: MavlinkVersion,
10624        __input: &[u8],
10625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10626        let avail_len = __input.len();
10627        let mut payload_buf = [0; Self::ENCODED_LEN];
10628        let mut buf = if avail_len < Self::ENCODED_LEN {
10629            payload_buf[0..avail_len].copy_from_slice(__input);
10630            Bytes::new(&payload_buf)
10631        } else {
10632            Bytes::new(__input)
10633        };
10634        let mut __struct = Self::default();
10635        __struct.message_rate = buf.get_u16_le();
10636        __struct.stream_id = buf.get_u8();
10637        __struct.on_off = buf.get_u8();
10638        Ok(__struct)
10639    }
10640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10641        let mut __tmp = BytesMut::new(bytes);
10642        #[allow(clippy::absurd_extreme_comparisons)]
10643        #[allow(unused_comparisons)]
10644        if __tmp.remaining() < Self::ENCODED_LEN {
10645            panic!(
10646                "buffer is too small (need {} bytes, but got {})",
10647                Self::ENCODED_LEN,
10648                __tmp.remaining(),
10649            )
10650        }
10651        __tmp.put_u16_le(self.message_rate);
10652        __tmp.put_u8(self.stream_id);
10653        __tmp.put_u8(self.on_off);
10654        if matches!(version, MavlinkVersion::V2) {
10655            let len = __tmp.len();
10656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10657        } else {
10658            __tmp.len()
10659        }
10660    }
10661}
10662#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10663#[doc = ""]
10664#[doc = "ID: 130"]
10665#[derive(Debug, Clone, PartialEq)]
10666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10668#[cfg_attr(feature = "ts", derive(TS))]
10669#[cfg_attr(feature = "ts", ts(export))]
10670pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10671    #[doc = "total data size (set on ACK only)."]
10672    pub size: u32,
10673    #[doc = "Width of a matrix or image."]
10674    pub width: u16,
10675    #[doc = "Height of a matrix or image."]
10676    pub height: u16,
10677    #[doc = "Number of packets being sent (set on ACK only)."]
10678    pub packets: u16,
10679    #[doc = "Type of requested/acknowledged data."]
10680    pub mavtype: MavlinkDataStreamType,
10681    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10682    pub payload: u8,
10683    #[doc = "JPEG quality. Values: [1-100]."]
10684    pub jpg_quality: u8,
10685}
10686impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10687    pub const ENCODED_LEN: usize = 13usize;
10688    pub const DEFAULT: Self = Self {
10689        size: 0_u32,
10690        width: 0_u16,
10691        height: 0_u16,
10692        packets: 0_u16,
10693        mavtype: MavlinkDataStreamType::DEFAULT,
10694        payload: 0_u8,
10695        jpg_quality: 0_u8,
10696    };
10697    #[cfg(feature = "arbitrary")]
10698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10699        use arbitrary::{Arbitrary, Unstructured};
10700        let mut buf = [0u8; 1024];
10701        rng.fill_bytes(&mut buf);
10702        let mut unstructured = Unstructured::new(&buf);
10703        Self::arbitrary(&mut unstructured).unwrap_or_default()
10704    }
10705}
10706impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10707    fn default() -> Self {
10708        Self::DEFAULT.clone()
10709    }
10710}
10711impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10712    type Message = MavMessage;
10713    const ID: u32 = 130u32;
10714    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10715    const EXTRA_CRC: u8 = 29u8;
10716    const ENCODED_LEN: usize = 13usize;
10717    fn deser(
10718        _version: MavlinkVersion,
10719        __input: &[u8],
10720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10721        let avail_len = __input.len();
10722        let mut payload_buf = [0; Self::ENCODED_LEN];
10723        let mut buf = if avail_len < Self::ENCODED_LEN {
10724            payload_buf[0..avail_len].copy_from_slice(__input);
10725            Bytes::new(&payload_buf)
10726        } else {
10727            Bytes::new(__input)
10728        };
10729        let mut __struct = Self::default();
10730        __struct.size = buf.get_u32_le();
10731        __struct.width = buf.get_u16_le();
10732        __struct.height = buf.get_u16_le();
10733        __struct.packets = buf.get_u16_le();
10734        let tmp = buf.get_u8();
10735        __struct.mavtype =
10736            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10737                enum_type: "MavlinkDataStreamType",
10738                value: tmp as u32,
10739            })?;
10740        __struct.payload = buf.get_u8();
10741        __struct.jpg_quality = buf.get_u8();
10742        Ok(__struct)
10743    }
10744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10745        let mut __tmp = BytesMut::new(bytes);
10746        #[allow(clippy::absurd_extreme_comparisons)]
10747        #[allow(unused_comparisons)]
10748        if __tmp.remaining() < Self::ENCODED_LEN {
10749            panic!(
10750                "buffer is too small (need {} bytes, but got {})",
10751                Self::ENCODED_LEN,
10752                __tmp.remaining(),
10753            )
10754        }
10755        __tmp.put_u32_le(self.size);
10756        __tmp.put_u16_le(self.width);
10757        __tmp.put_u16_le(self.height);
10758        __tmp.put_u16_le(self.packets);
10759        __tmp.put_u8(self.mavtype as u8);
10760        __tmp.put_u8(self.payload);
10761        __tmp.put_u8(self.jpg_quality);
10762        if matches!(version, MavlinkVersion::V2) {
10763            let len = __tmp.len();
10764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10765        } else {
10766            __tmp.len()
10767        }
10768    }
10769}
10770#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10771#[doc = ""]
10772#[doc = "ID: 254"]
10773#[derive(Debug, Clone, PartialEq)]
10774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10776#[cfg_attr(feature = "ts", derive(TS))]
10777#[cfg_attr(feature = "ts", ts(export))]
10778pub struct DEBUG_DATA {
10779    #[doc = "Timestamp (time since system boot)."]
10780    pub time_boot_ms: u32,
10781    #[doc = "DEBUG value"]
10782    pub value: f32,
10783    #[doc = "index of debug variable"]
10784    pub ind: u8,
10785}
10786impl DEBUG_DATA {
10787    pub const ENCODED_LEN: usize = 9usize;
10788    pub const DEFAULT: Self = Self {
10789        time_boot_ms: 0_u32,
10790        value: 0.0_f32,
10791        ind: 0_u8,
10792    };
10793    #[cfg(feature = "arbitrary")]
10794    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10795        use arbitrary::{Arbitrary, Unstructured};
10796        let mut buf = [0u8; 1024];
10797        rng.fill_bytes(&mut buf);
10798        let mut unstructured = Unstructured::new(&buf);
10799        Self::arbitrary(&mut unstructured).unwrap_or_default()
10800    }
10801}
10802impl Default for DEBUG_DATA {
10803    fn default() -> Self {
10804        Self::DEFAULT.clone()
10805    }
10806}
10807impl MessageData for DEBUG_DATA {
10808    type Message = MavMessage;
10809    const ID: u32 = 254u32;
10810    const NAME: &'static str = "DEBUG";
10811    const EXTRA_CRC: u8 = 46u8;
10812    const ENCODED_LEN: usize = 9usize;
10813    fn deser(
10814        _version: MavlinkVersion,
10815        __input: &[u8],
10816    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10817        let avail_len = __input.len();
10818        let mut payload_buf = [0; Self::ENCODED_LEN];
10819        let mut buf = if avail_len < Self::ENCODED_LEN {
10820            payload_buf[0..avail_len].copy_from_slice(__input);
10821            Bytes::new(&payload_buf)
10822        } else {
10823            Bytes::new(__input)
10824        };
10825        let mut __struct = Self::default();
10826        __struct.time_boot_ms = buf.get_u32_le();
10827        __struct.value = buf.get_f32_le();
10828        __struct.ind = buf.get_u8();
10829        Ok(__struct)
10830    }
10831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10832        let mut __tmp = BytesMut::new(bytes);
10833        #[allow(clippy::absurd_extreme_comparisons)]
10834        #[allow(unused_comparisons)]
10835        if __tmp.remaining() < Self::ENCODED_LEN {
10836            panic!(
10837                "buffer is too small (need {} bytes, but got {})",
10838                Self::ENCODED_LEN,
10839                __tmp.remaining(),
10840            )
10841        }
10842        __tmp.put_u32_le(self.time_boot_ms);
10843        __tmp.put_f32_le(self.value);
10844        __tmp.put_u8(self.ind);
10845        if matches!(version, MavlinkVersion::V2) {
10846            let len = __tmp.len();
10847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10848        } else {
10849            __tmp.len()
10850        }
10851    }
10852}
10853#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10854#[doc = ""]
10855#[doc = "ID: 350"]
10856#[derive(Debug, Clone, PartialEq)]
10857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10859#[cfg_attr(feature = "ts", derive(TS))]
10860#[cfg_attr(feature = "ts", ts(export))]
10861pub struct DEBUG_FLOAT_ARRAY_DATA {
10862    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10863    pub time_usec: u64,
10864    #[doc = "Unique ID used to discriminate between arrays"]
10865    pub array_id: u16,
10866    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10867    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10868    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10869    pub name: [u8; 10],
10870    #[doc = "data"]
10871    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10872    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10873    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10874    pub data: [f32; 58],
10875}
10876impl DEBUG_FLOAT_ARRAY_DATA {
10877    pub const ENCODED_LEN: usize = 252usize;
10878    pub const DEFAULT: Self = Self {
10879        time_usec: 0_u64,
10880        array_id: 0_u16,
10881        name: [0_u8; 10usize],
10882        data: [0.0_f32; 58usize],
10883    };
10884    #[cfg(feature = "arbitrary")]
10885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10886        use arbitrary::{Arbitrary, Unstructured};
10887        let mut buf = [0u8; 1024];
10888        rng.fill_bytes(&mut buf);
10889        let mut unstructured = Unstructured::new(&buf);
10890        Self::arbitrary(&mut unstructured).unwrap_or_default()
10891    }
10892}
10893impl Default for DEBUG_FLOAT_ARRAY_DATA {
10894    fn default() -> Self {
10895        Self::DEFAULT.clone()
10896    }
10897}
10898impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10899    type Message = MavMessage;
10900    const ID: u32 = 350u32;
10901    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10902    const EXTRA_CRC: u8 = 232u8;
10903    const ENCODED_LEN: usize = 252usize;
10904    fn deser(
10905        _version: MavlinkVersion,
10906        __input: &[u8],
10907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10908        let avail_len = __input.len();
10909        let mut payload_buf = [0; Self::ENCODED_LEN];
10910        let mut buf = if avail_len < Self::ENCODED_LEN {
10911            payload_buf[0..avail_len].copy_from_slice(__input);
10912            Bytes::new(&payload_buf)
10913        } else {
10914            Bytes::new(__input)
10915        };
10916        let mut __struct = Self::default();
10917        __struct.time_usec = buf.get_u64_le();
10918        __struct.array_id = buf.get_u16_le();
10919        for v in &mut __struct.name {
10920            let val = buf.get_u8();
10921            *v = val;
10922        }
10923        for v in &mut __struct.data {
10924            let val = buf.get_f32_le();
10925            *v = val;
10926        }
10927        Ok(__struct)
10928    }
10929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10930        let mut __tmp = BytesMut::new(bytes);
10931        #[allow(clippy::absurd_extreme_comparisons)]
10932        #[allow(unused_comparisons)]
10933        if __tmp.remaining() < Self::ENCODED_LEN {
10934            panic!(
10935                "buffer is too small (need {} bytes, but got {})",
10936                Self::ENCODED_LEN,
10937                __tmp.remaining(),
10938            )
10939        }
10940        __tmp.put_u64_le(self.time_usec);
10941        __tmp.put_u16_le(self.array_id);
10942        for val in &self.name {
10943            __tmp.put_u8(*val);
10944        }
10945        if matches!(version, MavlinkVersion::V2) {
10946            for val in &self.data {
10947                __tmp.put_f32_le(*val);
10948            }
10949            let len = __tmp.len();
10950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10951        } else {
10952            __tmp.len()
10953        }
10954    }
10955}
10956#[doc = "To debug something using a named 3D vector."]
10957#[doc = ""]
10958#[doc = "ID: 250"]
10959#[derive(Debug, Clone, PartialEq)]
10960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10962#[cfg_attr(feature = "ts", derive(TS))]
10963#[cfg_attr(feature = "ts", ts(export))]
10964pub struct DEBUG_VECT_DATA {
10965    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10966    pub time_usec: u64,
10967    #[doc = "x"]
10968    pub x: f32,
10969    #[doc = "y"]
10970    pub y: f32,
10971    #[doc = "z"]
10972    pub z: f32,
10973    #[doc = "Name"]
10974    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10975    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10976    pub name: [u8; 10],
10977}
10978impl DEBUG_VECT_DATA {
10979    pub const ENCODED_LEN: usize = 30usize;
10980    pub const DEFAULT: Self = Self {
10981        time_usec: 0_u64,
10982        x: 0.0_f32,
10983        y: 0.0_f32,
10984        z: 0.0_f32,
10985        name: [0_u8; 10usize],
10986    };
10987    #[cfg(feature = "arbitrary")]
10988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10989        use arbitrary::{Arbitrary, Unstructured};
10990        let mut buf = [0u8; 1024];
10991        rng.fill_bytes(&mut buf);
10992        let mut unstructured = Unstructured::new(&buf);
10993        Self::arbitrary(&mut unstructured).unwrap_or_default()
10994    }
10995}
10996impl Default for DEBUG_VECT_DATA {
10997    fn default() -> Self {
10998        Self::DEFAULT.clone()
10999    }
11000}
11001impl MessageData for DEBUG_VECT_DATA {
11002    type Message = MavMessage;
11003    const ID: u32 = 250u32;
11004    const NAME: &'static str = "DEBUG_VECT";
11005    const EXTRA_CRC: u8 = 49u8;
11006    const ENCODED_LEN: usize = 30usize;
11007    fn deser(
11008        _version: MavlinkVersion,
11009        __input: &[u8],
11010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11011        let avail_len = __input.len();
11012        let mut payload_buf = [0; Self::ENCODED_LEN];
11013        let mut buf = if avail_len < Self::ENCODED_LEN {
11014            payload_buf[0..avail_len].copy_from_slice(__input);
11015            Bytes::new(&payload_buf)
11016        } else {
11017            Bytes::new(__input)
11018        };
11019        let mut __struct = Self::default();
11020        __struct.time_usec = buf.get_u64_le();
11021        __struct.x = buf.get_f32_le();
11022        __struct.y = buf.get_f32_le();
11023        __struct.z = buf.get_f32_le();
11024        for v in &mut __struct.name {
11025            let val = buf.get_u8();
11026            *v = val;
11027        }
11028        Ok(__struct)
11029    }
11030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11031        let mut __tmp = BytesMut::new(bytes);
11032        #[allow(clippy::absurd_extreme_comparisons)]
11033        #[allow(unused_comparisons)]
11034        if __tmp.remaining() < Self::ENCODED_LEN {
11035            panic!(
11036                "buffer is too small (need {} bytes, but got {})",
11037                Self::ENCODED_LEN,
11038                __tmp.remaining(),
11039            )
11040        }
11041        __tmp.put_u64_le(self.time_usec);
11042        __tmp.put_f32_le(self.x);
11043        __tmp.put_f32_le(self.y);
11044        __tmp.put_f32_le(self.z);
11045        for val in &self.name {
11046            __tmp.put_u8(*val);
11047        }
11048        if matches!(version, MavlinkVersion::V2) {
11049            let len = __tmp.len();
11050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11051        } else {
11052            __tmp.len()
11053        }
11054    }
11055}
11056#[doc = "Distance sensor information for an onboard rangefinder."]
11057#[doc = ""]
11058#[doc = "ID: 132"]
11059#[derive(Debug, Clone, PartialEq)]
11060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11062#[cfg_attr(feature = "ts", derive(TS))]
11063#[cfg_attr(feature = "ts", ts(export))]
11064pub struct DISTANCE_SENSOR_DATA {
11065    #[doc = "Timestamp (time since system boot)."]
11066    pub time_boot_ms: u32,
11067    #[doc = "Minimum distance the sensor can measure"]
11068    pub min_distance: u16,
11069    #[doc = "Maximum distance the sensor can measure"]
11070    pub max_distance: u16,
11071    #[doc = "Current distance reading"]
11072    pub current_distance: u16,
11073    #[doc = "Type of distance sensor."]
11074    pub mavtype: MavDistanceSensor,
11075    #[doc = "Onboard ID of the sensor"]
11076    pub id: u8,
11077    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11078    pub orientation: MavSensorOrientation,
11079    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11080    pub covariance: u8,
11081    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11082    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11083    pub horizontal_fov: f32,
11084    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11085    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11086    pub vertical_fov: f32,
11087    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11088    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11089    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11090    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11091    pub quaternion: [f32; 4],
11092    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11093    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11094    pub signal_quality: u8,
11095}
11096impl DISTANCE_SENSOR_DATA {
11097    pub const ENCODED_LEN: usize = 39usize;
11098    pub const DEFAULT: Self = Self {
11099        time_boot_ms: 0_u32,
11100        min_distance: 0_u16,
11101        max_distance: 0_u16,
11102        current_distance: 0_u16,
11103        mavtype: MavDistanceSensor::DEFAULT,
11104        id: 0_u8,
11105        orientation: MavSensorOrientation::DEFAULT,
11106        covariance: 0_u8,
11107        horizontal_fov: 0.0_f32,
11108        vertical_fov: 0.0_f32,
11109        quaternion: [0.0_f32; 4usize],
11110        signal_quality: 0_u8,
11111    };
11112    #[cfg(feature = "arbitrary")]
11113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11114        use arbitrary::{Arbitrary, Unstructured};
11115        let mut buf = [0u8; 1024];
11116        rng.fill_bytes(&mut buf);
11117        let mut unstructured = Unstructured::new(&buf);
11118        Self::arbitrary(&mut unstructured).unwrap_or_default()
11119    }
11120}
11121impl Default for DISTANCE_SENSOR_DATA {
11122    fn default() -> Self {
11123        Self::DEFAULT.clone()
11124    }
11125}
11126impl MessageData for DISTANCE_SENSOR_DATA {
11127    type Message = MavMessage;
11128    const ID: u32 = 132u32;
11129    const NAME: &'static str = "DISTANCE_SENSOR";
11130    const EXTRA_CRC: u8 = 85u8;
11131    const ENCODED_LEN: usize = 39usize;
11132    fn deser(
11133        _version: MavlinkVersion,
11134        __input: &[u8],
11135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11136        let avail_len = __input.len();
11137        let mut payload_buf = [0; Self::ENCODED_LEN];
11138        let mut buf = if avail_len < Self::ENCODED_LEN {
11139            payload_buf[0..avail_len].copy_from_slice(__input);
11140            Bytes::new(&payload_buf)
11141        } else {
11142            Bytes::new(__input)
11143        };
11144        let mut __struct = Self::default();
11145        __struct.time_boot_ms = buf.get_u32_le();
11146        __struct.min_distance = buf.get_u16_le();
11147        __struct.max_distance = buf.get_u16_le();
11148        __struct.current_distance = buf.get_u16_le();
11149        let tmp = buf.get_u8();
11150        __struct.mavtype =
11151            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11152                enum_type: "MavDistanceSensor",
11153                value: tmp as u32,
11154            })?;
11155        __struct.id = buf.get_u8();
11156        let tmp = buf.get_u8();
11157        __struct.orientation =
11158            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11159                enum_type: "MavSensorOrientation",
11160                value: tmp as u32,
11161            })?;
11162        __struct.covariance = buf.get_u8();
11163        __struct.horizontal_fov = buf.get_f32_le();
11164        __struct.vertical_fov = buf.get_f32_le();
11165        for v in &mut __struct.quaternion {
11166            let val = buf.get_f32_le();
11167            *v = val;
11168        }
11169        __struct.signal_quality = buf.get_u8();
11170        Ok(__struct)
11171    }
11172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11173        let mut __tmp = BytesMut::new(bytes);
11174        #[allow(clippy::absurd_extreme_comparisons)]
11175        #[allow(unused_comparisons)]
11176        if __tmp.remaining() < Self::ENCODED_LEN {
11177            panic!(
11178                "buffer is too small (need {} bytes, but got {})",
11179                Self::ENCODED_LEN,
11180                __tmp.remaining(),
11181            )
11182        }
11183        __tmp.put_u32_le(self.time_boot_ms);
11184        __tmp.put_u16_le(self.min_distance);
11185        __tmp.put_u16_le(self.max_distance);
11186        __tmp.put_u16_le(self.current_distance);
11187        __tmp.put_u8(self.mavtype as u8);
11188        __tmp.put_u8(self.id);
11189        __tmp.put_u8(self.orientation as u8);
11190        __tmp.put_u8(self.covariance);
11191        if matches!(version, MavlinkVersion::V2) {
11192            __tmp.put_f32_le(self.horizontal_fov);
11193            __tmp.put_f32_le(self.vertical_fov);
11194            for val in &self.quaternion {
11195                __tmp.put_f32_le(*val);
11196            }
11197            __tmp.put_u8(self.signal_quality);
11198            let len = __tmp.len();
11199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11200        } else {
11201            __tmp.len()
11202        }
11203    }
11204}
11205#[doc = "EFI status output."]
11206#[doc = ""]
11207#[doc = "ID: 225"]
11208#[derive(Debug, Clone, PartialEq)]
11209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11211#[cfg_attr(feature = "ts", derive(TS))]
11212#[cfg_attr(feature = "ts", ts(export))]
11213pub struct EFI_STATUS_DATA {
11214    #[doc = "ECU index"]
11215    pub ecu_index: f32,
11216    #[doc = "RPM"]
11217    pub rpm: f32,
11218    #[doc = "Fuel consumed"]
11219    pub fuel_consumed: f32,
11220    #[doc = "Fuel flow rate"]
11221    pub fuel_flow: f32,
11222    #[doc = "Engine load"]
11223    pub engine_load: f32,
11224    #[doc = "Throttle position"]
11225    pub throttle_position: f32,
11226    #[doc = "Spark dwell time"]
11227    pub spark_dwell_time: f32,
11228    #[doc = "Barometric pressure"]
11229    pub barometric_pressure: f32,
11230    #[doc = "Intake manifold pressure("]
11231    pub intake_manifold_pressure: f32,
11232    #[doc = "Intake manifold temperature"]
11233    pub intake_manifold_temperature: f32,
11234    #[doc = "Cylinder head temperature"]
11235    pub cylinder_head_temperature: f32,
11236    #[doc = "Ignition timing (Crank angle degrees)"]
11237    pub ignition_timing: f32,
11238    #[doc = "Injection time"]
11239    pub injection_time: f32,
11240    #[doc = "Exhaust gas temperature"]
11241    pub exhaust_gas_temperature: f32,
11242    #[doc = "Output throttle"]
11243    pub throttle_out: f32,
11244    #[doc = "Pressure/temperature compensation"]
11245    pub pt_compensation: f32,
11246    #[doc = "EFI health status"]
11247    pub health: u8,
11248    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11249    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11250    pub ignition_voltage: f32,
11251    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11252    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11253    pub fuel_pressure: f32,
11254}
11255impl EFI_STATUS_DATA {
11256    pub const ENCODED_LEN: usize = 73usize;
11257    pub const DEFAULT: Self = Self {
11258        ecu_index: 0.0_f32,
11259        rpm: 0.0_f32,
11260        fuel_consumed: 0.0_f32,
11261        fuel_flow: 0.0_f32,
11262        engine_load: 0.0_f32,
11263        throttle_position: 0.0_f32,
11264        spark_dwell_time: 0.0_f32,
11265        barometric_pressure: 0.0_f32,
11266        intake_manifold_pressure: 0.0_f32,
11267        intake_manifold_temperature: 0.0_f32,
11268        cylinder_head_temperature: 0.0_f32,
11269        ignition_timing: 0.0_f32,
11270        injection_time: 0.0_f32,
11271        exhaust_gas_temperature: 0.0_f32,
11272        throttle_out: 0.0_f32,
11273        pt_compensation: 0.0_f32,
11274        health: 0_u8,
11275        ignition_voltage: 0.0_f32,
11276        fuel_pressure: 0.0_f32,
11277    };
11278    #[cfg(feature = "arbitrary")]
11279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11280        use arbitrary::{Arbitrary, Unstructured};
11281        let mut buf = [0u8; 1024];
11282        rng.fill_bytes(&mut buf);
11283        let mut unstructured = Unstructured::new(&buf);
11284        Self::arbitrary(&mut unstructured).unwrap_or_default()
11285    }
11286}
11287impl Default for EFI_STATUS_DATA {
11288    fn default() -> Self {
11289        Self::DEFAULT.clone()
11290    }
11291}
11292impl MessageData for EFI_STATUS_DATA {
11293    type Message = MavMessage;
11294    const ID: u32 = 225u32;
11295    const NAME: &'static str = "EFI_STATUS";
11296    const EXTRA_CRC: u8 = 208u8;
11297    const ENCODED_LEN: usize = 73usize;
11298    fn deser(
11299        _version: MavlinkVersion,
11300        __input: &[u8],
11301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11302        let avail_len = __input.len();
11303        let mut payload_buf = [0; Self::ENCODED_LEN];
11304        let mut buf = if avail_len < Self::ENCODED_LEN {
11305            payload_buf[0..avail_len].copy_from_slice(__input);
11306            Bytes::new(&payload_buf)
11307        } else {
11308            Bytes::new(__input)
11309        };
11310        let mut __struct = Self::default();
11311        __struct.ecu_index = buf.get_f32_le();
11312        __struct.rpm = buf.get_f32_le();
11313        __struct.fuel_consumed = buf.get_f32_le();
11314        __struct.fuel_flow = buf.get_f32_le();
11315        __struct.engine_load = buf.get_f32_le();
11316        __struct.throttle_position = buf.get_f32_le();
11317        __struct.spark_dwell_time = buf.get_f32_le();
11318        __struct.barometric_pressure = buf.get_f32_le();
11319        __struct.intake_manifold_pressure = buf.get_f32_le();
11320        __struct.intake_manifold_temperature = buf.get_f32_le();
11321        __struct.cylinder_head_temperature = buf.get_f32_le();
11322        __struct.ignition_timing = buf.get_f32_le();
11323        __struct.injection_time = buf.get_f32_le();
11324        __struct.exhaust_gas_temperature = buf.get_f32_le();
11325        __struct.throttle_out = buf.get_f32_le();
11326        __struct.pt_compensation = buf.get_f32_le();
11327        __struct.health = buf.get_u8();
11328        __struct.ignition_voltage = buf.get_f32_le();
11329        __struct.fuel_pressure = buf.get_f32_le();
11330        Ok(__struct)
11331    }
11332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11333        let mut __tmp = BytesMut::new(bytes);
11334        #[allow(clippy::absurd_extreme_comparisons)]
11335        #[allow(unused_comparisons)]
11336        if __tmp.remaining() < Self::ENCODED_LEN {
11337            panic!(
11338                "buffer is too small (need {} bytes, but got {})",
11339                Self::ENCODED_LEN,
11340                __tmp.remaining(),
11341            )
11342        }
11343        __tmp.put_f32_le(self.ecu_index);
11344        __tmp.put_f32_le(self.rpm);
11345        __tmp.put_f32_le(self.fuel_consumed);
11346        __tmp.put_f32_le(self.fuel_flow);
11347        __tmp.put_f32_le(self.engine_load);
11348        __tmp.put_f32_le(self.throttle_position);
11349        __tmp.put_f32_le(self.spark_dwell_time);
11350        __tmp.put_f32_le(self.barometric_pressure);
11351        __tmp.put_f32_le(self.intake_manifold_pressure);
11352        __tmp.put_f32_le(self.intake_manifold_temperature);
11353        __tmp.put_f32_le(self.cylinder_head_temperature);
11354        __tmp.put_f32_le(self.ignition_timing);
11355        __tmp.put_f32_le(self.injection_time);
11356        __tmp.put_f32_le(self.exhaust_gas_temperature);
11357        __tmp.put_f32_le(self.throttle_out);
11358        __tmp.put_f32_le(self.pt_compensation);
11359        __tmp.put_u8(self.health);
11360        if matches!(version, MavlinkVersion::V2) {
11361            __tmp.put_f32_le(self.ignition_voltage);
11362            __tmp.put_f32_le(self.fuel_pressure);
11363            let len = __tmp.len();
11364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11365        } else {
11366            __tmp.len()
11367        }
11368    }
11369}
11370#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11371#[doc = ""]
11372#[doc = "ID: 131"]
11373#[derive(Debug, Clone, PartialEq)]
11374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11376#[cfg_attr(feature = "ts", derive(TS))]
11377#[cfg_attr(feature = "ts", ts(export))]
11378pub struct ENCAPSULATED_DATA_DATA {
11379    #[doc = "sequence number (starting with 0 on every transmission)"]
11380    pub seqnr: u16,
11381    #[doc = "image data bytes"]
11382    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11383    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11384    pub data: [u8; 253],
11385}
11386impl ENCAPSULATED_DATA_DATA {
11387    pub const ENCODED_LEN: usize = 255usize;
11388    pub const DEFAULT: Self = Self {
11389        seqnr: 0_u16,
11390        data: [0_u8; 253usize],
11391    };
11392    #[cfg(feature = "arbitrary")]
11393    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11394        use arbitrary::{Arbitrary, Unstructured};
11395        let mut buf = [0u8; 1024];
11396        rng.fill_bytes(&mut buf);
11397        let mut unstructured = Unstructured::new(&buf);
11398        Self::arbitrary(&mut unstructured).unwrap_or_default()
11399    }
11400}
11401impl Default for ENCAPSULATED_DATA_DATA {
11402    fn default() -> Self {
11403        Self::DEFAULT.clone()
11404    }
11405}
11406impl MessageData for ENCAPSULATED_DATA_DATA {
11407    type Message = MavMessage;
11408    const ID: u32 = 131u32;
11409    const NAME: &'static str = "ENCAPSULATED_DATA";
11410    const EXTRA_CRC: u8 = 223u8;
11411    const ENCODED_LEN: usize = 255usize;
11412    fn deser(
11413        _version: MavlinkVersion,
11414        __input: &[u8],
11415    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11416        let avail_len = __input.len();
11417        let mut payload_buf = [0; Self::ENCODED_LEN];
11418        let mut buf = if avail_len < Self::ENCODED_LEN {
11419            payload_buf[0..avail_len].copy_from_slice(__input);
11420            Bytes::new(&payload_buf)
11421        } else {
11422            Bytes::new(__input)
11423        };
11424        let mut __struct = Self::default();
11425        __struct.seqnr = buf.get_u16_le();
11426        for v in &mut __struct.data {
11427            let val = buf.get_u8();
11428            *v = val;
11429        }
11430        Ok(__struct)
11431    }
11432    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11433        let mut __tmp = BytesMut::new(bytes);
11434        #[allow(clippy::absurd_extreme_comparisons)]
11435        #[allow(unused_comparisons)]
11436        if __tmp.remaining() < Self::ENCODED_LEN {
11437            panic!(
11438                "buffer is too small (need {} bytes, but got {})",
11439                Self::ENCODED_LEN,
11440                __tmp.remaining(),
11441            )
11442        }
11443        __tmp.put_u16_le(self.seqnr);
11444        for val in &self.data {
11445            __tmp.put_u8(*val);
11446        }
11447        if matches!(version, MavlinkVersion::V2) {
11448            let len = __tmp.len();
11449            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11450        } else {
11451            __tmp.len()
11452        }
11453    }
11454}
11455#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11456#[doc = ""]
11457#[doc = "ID: 290"]
11458#[derive(Debug, Clone, PartialEq)]
11459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11461#[cfg_attr(feature = "ts", derive(TS))]
11462#[cfg_attr(feature = "ts", ts(export))]
11463pub struct ESC_INFO_DATA {
11464    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11465    pub time_usec: u64,
11466    #[doc = "Number of reported errors by each ESC since boot."]
11467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11468    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11469    pub error_count: [u32; 4],
11470    #[doc = "Counter of data packets received."]
11471    pub counter: u16,
11472    #[doc = "Bitmap of ESC failure flags."]
11473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11474    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11475    pub failure_flags: [u16; 4],
11476    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11479    pub temperature: [i16; 4],
11480    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11481    pub index: u8,
11482    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11483    pub count: u8,
11484    #[doc = "Connection type protocol for all ESC."]
11485    pub connection_type: EscConnectionType,
11486    #[doc = "Information regarding online/offline status of each ESC."]
11487    pub info: u8,
11488}
11489impl ESC_INFO_DATA {
11490    pub const ENCODED_LEN: usize = 46usize;
11491    pub const DEFAULT: Self = Self {
11492        time_usec: 0_u64,
11493        error_count: [0_u32; 4usize],
11494        counter: 0_u16,
11495        failure_flags: [0_u16; 4usize],
11496        temperature: [0_i16; 4usize],
11497        index: 0_u8,
11498        count: 0_u8,
11499        connection_type: EscConnectionType::DEFAULT,
11500        info: 0_u8,
11501    };
11502    #[cfg(feature = "arbitrary")]
11503    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11504        use arbitrary::{Arbitrary, Unstructured};
11505        let mut buf = [0u8; 1024];
11506        rng.fill_bytes(&mut buf);
11507        let mut unstructured = Unstructured::new(&buf);
11508        Self::arbitrary(&mut unstructured).unwrap_or_default()
11509    }
11510}
11511impl Default for ESC_INFO_DATA {
11512    fn default() -> Self {
11513        Self::DEFAULT.clone()
11514    }
11515}
11516impl MessageData for ESC_INFO_DATA {
11517    type Message = MavMessage;
11518    const ID: u32 = 290u32;
11519    const NAME: &'static str = "ESC_INFO";
11520    const EXTRA_CRC: u8 = 251u8;
11521    const ENCODED_LEN: usize = 46usize;
11522    fn deser(
11523        _version: MavlinkVersion,
11524        __input: &[u8],
11525    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11526        let avail_len = __input.len();
11527        let mut payload_buf = [0; Self::ENCODED_LEN];
11528        let mut buf = if avail_len < Self::ENCODED_LEN {
11529            payload_buf[0..avail_len].copy_from_slice(__input);
11530            Bytes::new(&payload_buf)
11531        } else {
11532            Bytes::new(__input)
11533        };
11534        let mut __struct = Self::default();
11535        __struct.time_usec = buf.get_u64_le();
11536        for v in &mut __struct.error_count {
11537            let val = buf.get_u32_le();
11538            *v = val;
11539        }
11540        __struct.counter = buf.get_u16_le();
11541        for v in &mut __struct.failure_flags {
11542            let val = buf.get_u16_le();
11543            *v = val;
11544        }
11545        for v in &mut __struct.temperature {
11546            let val = buf.get_i16_le();
11547            *v = val;
11548        }
11549        __struct.index = buf.get_u8();
11550        __struct.count = buf.get_u8();
11551        let tmp = buf.get_u8();
11552        __struct.connection_type =
11553            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11554                enum_type: "EscConnectionType",
11555                value: tmp as u32,
11556            })?;
11557        __struct.info = buf.get_u8();
11558        Ok(__struct)
11559    }
11560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11561        let mut __tmp = BytesMut::new(bytes);
11562        #[allow(clippy::absurd_extreme_comparisons)]
11563        #[allow(unused_comparisons)]
11564        if __tmp.remaining() < Self::ENCODED_LEN {
11565            panic!(
11566                "buffer is too small (need {} bytes, but got {})",
11567                Self::ENCODED_LEN,
11568                __tmp.remaining(),
11569            )
11570        }
11571        __tmp.put_u64_le(self.time_usec);
11572        for val in &self.error_count {
11573            __tmp.put_u32_le(*val);
11574        }
11575        __tmp.put_u16_le(self.counter);
11576        for val in &self.failure_flags {
11577            __tmp.put_u16_le(*val);
11578        }
11579        for val in &self.temperature {
11580            __tmp.put_i16_le(*val);
11581        }
11582        __tmp.put_u8(self.index);
11583        __tmp.put_u8(self.count);
11584        __tmp.put_u8(self.connection_type as u8);
11585        __tmp.put_u8(self.info);
11586        if matches!(version, MavlinkVersion::V2) {
11587            let len = __tmp.len();
11588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11589        } else {
11590            __tmp.len()
11591        }
11592    }
11593}
11594#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11595#[doc = ""]
11596#[doc = "ID: 291"]
11597#[derive(Debug, Clone, PartialEq)]
11598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11600#[cfg_attr(feature = "ts", derive(TS))]
11601#[cfg_attr(feature = "ts", ts(export))]
11602pub struct ESC_STATUS_DATA {
11603    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11604    pub time_usec: u64,
11605    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11606    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11607    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11608    pub rpm: [i32; 4],
11609    #[doc = "Voltage measured from each ESC."]
11610    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11611    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11612    pub voltage: [f32; 4],
11613    #[doc = "Current measured from each ESC."]
11614    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11615    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11616    pub current: [f32; 4],
11617    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11618    pub index: u8,
11619}
11620impl ESC_STATUS_DATA {
11621    pub const ENCODED_LEN: usize = 57usize;
11622    pub const DEFAULT: Self = Self {
11623        time_usec: 0_u64,
11624        rpm: [0_i32; 4usize],
11625        voltage: [0.0_f32; 4usize],
11626        current: [0.0_f32; 4usize],
11627        index: 0_u8,
11628    };
11629    #[cfg(feature = "arbitrary")]
11630    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11631        use arbitrary::{Arbitrary, Unstructured};
11632        let mut buf = [0u8; 1024];
11633        rng.fill_bytes(&mut buf);
11634        let mut unstructured = Unstructured::new(&buf);
11635        Self::arbitrary(&mut unstructured).unwrap_or_default()
11636    }
11637}
11638impl Default for ESC_STATUS_DATA {
11639    fn default() -> Self {
11640        Self::DEFAULT.clone()
11641    }
11642}
11643impl MessageData for ESC_STATUS_DATA {
11644    type Message = MavMessage;
11645    const ID: u32 = 291u32;
11646    const NAME: &'static str = "ESC_STATUS";
11647    const EXTRA_CRC: u8 = 10u8;
11648    const ENCODED_LEN: usize = 57usize;
11649    fn deser(
11650        _version: MavlinkVersion,
11651        __input: &[u8],
11652    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11653        let avail_len = __input.len();
11654        let mut payload_buf = [0; Self::ENCODED_LEN];
11655        let mut buf = if avail_len < Self::ENCODED_LEN {
11656            payload_buf[0..avail_len].copy_from_slice(__input);
11657            Bytes::new(&payload_buf)
11658        } else {
11659            Bytes::new(__input)
11660        };
11661        let mut __struct = Self::default();
11662        __struct.time_usec = buf.get_u64_le();
11663        for v in &mut __struct.rpm {
11664            let val = buf.get_i32_le();
11665            *v = val;
11666        }
11667        for v in &mut __struct.voltage {
11668            let val = buf.get_f32_le();
11669            *v = val;
11670        }
11671        for v in &mut __struct.current {
11672            let val = buf.get_f32_le();
11673            *v = val;
11674        }
11675        __struct.index = buf.get_u8();
11676        Ok(__struct)
11677    }
11678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11679        let mut __tmp = BytesMut::new(bytes);
11680        #[allow(clippy::absurd_extreme_comparisons)]
11681        #[allow(unused_comparisons)]
11682        if __tmp.remaining() < Self::ENCODED_LEN {
11683            panic!(
11684                "buffer is too small (need {} bytes, but got {})",
11685                Self::ENCODED_LEN,
11686                __tmp.remaining(),
11687            )
11688        }
11689        __tmp.put_u64_le(self.time_usec);
11690        for val in &self.rpm {
11691            __tmp.put_i32_le(*val);
11692        }
11693        for val in &self.voltage {
11694            __tmp.put_f32_le(*val);
11695        }
11696        for val in &self.current {
11697            __tmp.put_f32_le(*val);
11698        }
11699        __tmp.put_u8(self.index);
11700        if matches!(version, MavlinkVersion::V2) {
11701            let len = __tmp.len();
11702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11703        } else {
11704            __tmp.len()
11705        }
11706    }
11707}
11708#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11709#[doc = ""]
11710#[doc = "ID: 230"]
11711#[derive(Debug, Clone, PartialEq)]
11712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11714#[cfg_attr(feature = "ts", derive(TS))]
11715#[cfg_attr(feature = "ts", ts(export))]
11716pub struct ESTIMATOR_STATUS_DATA {
11717    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11718    pub time_usec: u64,
11719    #[doc = "Velocity innovation test ratio"]
11720    pub vel_ratio: f32,
11721    #[doc = "Horizontal position innovation test ratio"]
11722    pub pos_horiz_ratio: f32,
11723    #[doc = "Vertical position innovation test ratio"]
11724    pub pos_vert_ratio: f32,
11725    #[doc = "Magnetometer innovation test ratio"]
11726    pub mag_ratio: f32,
11727    #[doc = "Height above terrain innovation test ratio"]
11728    pub hagl_ratio: f32,
11729    #[doc = "True airspeed innovation test ratio"]
11730    pub tas_ratio: f32,
11731    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11732    pub pos_horiz_accuracy: f32,
11733    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11734    pub pos_vert_accuracy: f32,
11735    #[doc = "Bitmap indicating which EKF outputs are valid."]
11736    pub flags: EstimatorStatusFlags,
11737}
11738impl ESTIMATOR_STATUS_DATA {
11739    pub const ENCODED_LEN: usize = 42usize;
11740    pub const DEFAULT: Self = Self {
11741        time_usec: 0_u64,
11742        vel_ratio: 0.0_f32,
11743        pos_horiz_ratio: 0.0_f32,
11744        pos_vert_ratio: 0.0_f32,
11745        mag_ratio: 0.0_f32,
11746        hagl_ratio: 0.0_f32,
11747        tas_ratio: 0.0_f32,
11748        pos_horiz_accuracy: 0.0_f32,
11749        pos_vert_accuracy: 0.0_f32,
11750        flags: EstimatorStatusFlags::DEFAULT,
11751    };
11752    #[cfg(feature = "arbitrary")]
11753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11754        use arbitrary::{Arbitrary, Unstructured};
11755        let mut buf = [0u8; 1024];
11756        rng.fill_bytes(&mut buf);
11757        let mut unstructured = Unstructured::new(&buf);
11758        Self::arbitrary(&mut unstructured).unwrap_or_default()
11759    }
11760}
11761impl Default for ESTIMATOR_STATUS_DATA {
11762    fn default() -> Self {
11763        Self::DEFAULT.clone()
11764    }
11765}
11766impl MessageData for ESTIMATOR_STATUS_DATA {
11767    type Message = MavMessage;
11768    const ID: u32 = 230u32;
11769    const NAME: &'static str = "ESTIMATOR_STATUS";
11770    const EXTRA_CRC: u8 = 163u8;
11771    const ENCODED_LEN: usize = 42usize;
11772    fn deser(
11773        _version: MavlinkVersion,
11774        __input: &[u8],
11775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11776        let avail_len = __input.len();
11777        let mut payload_buf = [0; Self::ENCODED_LEN];
11778        let mut buf = if avail_len < Self::ENCODED_LEN {
11779            payload_buf[0..avail_len].copy_from_slice(__input);
11780            Bytes::new(&payload_buf)
11781        } else {
11782            Bytes::new(__input)
11783        };
11784        let mut __struct = Self::default();
11785        __struct.time_usec = buf.get_u64_le();
11786        __struct.vel_ratio = buf.get_f32_le();
11787        __struct.pos_horiz_ratio = buf.get_f32_le();
11788        __struct.pos_vert_ratio = buf.get_f32_le();
11789        __struct.mag_ratio = buf.get_f32_le();
11790        __struct.hagl_ratio = buf.get_f32_le();
11791        __struct.tas_ratio = buf.get_f32_le();
11792        __struct.pos_horiz_accuracy = buf.get_f32_le();
11793        __struct.pos_vert_accuracy = buf.get_f32_le();
11794        let tmp = buf.get_u16_le();
11795        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11796            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11797                flag_type: "EstimatorStatusFlags",
11798                value: tmp as u32,
11799            })?;
11800        Ok(__struct)
11801    }
11802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11803        let mut __tmp = BytesMut::new(bytes);
11804        #[allow(clippy::absurd_extreme_comparisons)]
11805        #[allow(unused_comparisons)]
11806        if __tmp.remaining() < Self::ENCODED_LEN {
11807            panic!(
11808                "buffer is too small (need {} bytes, but got {})",
11809                Self::ENCODED_LEN,
11810                __tmp.remaining(),
11811            )
11812        }
11813        __tmp.put_u64_le(self.time_usec);
11814        __tmp.put_f32_le(self.vel_ratio);
11815        __tmp.put_f32_le(self.pos_horiz_ratio);
11816        __tmp.put_f32_le(self.pos_vert_ratio);
11817        __tmp.put_f32_le(self.mag_ratio);
11818        __tmp.put_f32_le(self.hagl_ratio);
11819        __tmp.put_f32_le(self.tas_ratio);
11820        __tmp.put_f32_le(self.pos_horiz_accuracy);
11821        __tmp.put_f32_le(self.pos_vert_accuracy);
11822        __tmp.put_u16_le(self.flags.bits());
11823        if matches!(version, MavlinkVersion::V2) {
11824            let len = __tmp.len();
11825            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11826        } else {
11827            __tmp.len()
11828        }
11829    }
11830}
11831#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11832#[doc = ""]
11833#[doc = "ID: 410"]
11834#[derive(Debug, Clone, PartialEq)]
11835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11837#[cfg_attr(feature = "ts", derive(TS))]
11838#[cfg_attr(feature = "ts", ts(export))]
11839pub struct EVENT_DATA {
11840    #[doc = "Event ID (as defined in the component metadata)"]
11841    pub id: u32,
11842    #[doc = "Timestamp (time since system boot when the event happened)."]
11843    pub event_time_boot_ms: u32,
11844    #[doc = "Sequence number."]
11845    pub sequence: u16,
11846    #[doc = "Component ID"]
11847    pub destination_component: u8,
11848    #[doc = "System ID"]
11849    pub destination_system: u8,
11850    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11851    pub log_levels: u8,
11852    #[doc = "Arguments (depend on event ID)."]
11853    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11854    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11855    pub arguments: [u8; 40],
11856}
11857impl EVENT_DATA {
11858    pub const ENCODED_LEN: usize = 53usize;
11859    pub const DEFAULT: Self = Self {
11860        id: 0_u32,
11861        event_time_boot_ms: 0_u32,
11862        sequence: 0_u16,
11863        destination_component: 0_u8,
11864        destination_system: 0_u8,
11865        log_levels: 0_u8,
11866        arguments: [0_u8; 40usize],
11867    };
11868    #[cfg(feature = "arbitrary")]
11869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11870        use arbitrary::{Arbitrary, Unstructured};
11871        let mut buf = [0u8; 1024];
11872        rng.fill_bytes(&mut buf);
11873        let mut unstructured = Unstructured::new(&buf);
11874        Self::arbitrary(&mut unstructured).unwrap_or_default()
11875    }
11876}
11877impl Default for EVENT_DATA {
11878    fn default() -> Self {
11879        Self::DEFAULT.clone()
11880    }
11881}
11882impl MessageData for EVENT_DATA {
11883    type Message = MavMessage;
11884    const ID: u32 = 410u32;
11885    const NAME: &'static str = "EVENT";
11886    const EXTRA_CRC: u8 = 160u8;
11887    const ENCODED_LEN: usize = 53usize;
11888    fn deser(
11889        _version: MavlinkVersion,
11890        __input: &[u8],
11891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11892        let avail_len = __input.len();
11893        let mut payload_buf = [0; Self::ENCODED_LEN];
11894        let mut buf = if avail_len < Self::ENCODED_LEN {
11895            payload_buf[0..avail_len].copy_from_slice(__input);
11896            Bytes::new(&payload_buf)
11897        } else {
11898            Bytes::new(__input)
11899        };
11900        let mut __struct = Self::default();
11901        __struct.id = buf.get_u32_le();
11902        __struct.event_time_boot_ms = buf.get_u32_le();
11903        __struct.sequence = buf.get_u16_le();
11904        __struct.destination_component = buf.get_u8();
11905        __struct.destination_system = buf.get_u8();
11906        __struct.log_levels = buf.get_u8();
11907        for v in &mut __struct.arguments {
11908            let val = buf.get_u8();
11909            *v = val;
11910        }
11911        Ok(__struct)
11912    }
11913    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11914        let mut __tmp = BytesMut::new(bytes);
11915        #[allow(clippy::absurd_extreme_comparisons)]
11916        #[allow(unused_comparisons)]
11917        if __tmp.remaining() < Self::ENCODED_LEN {
11918            panic!(
11919                "buffer is too small (need {} bytes, but got {})",
11920                Self::ENCODED_LEN,
11921                __tmp.remaining(),
11922            )
11923        }
11924        __tmp.put_u32_le(self.id);
11925        __tmp.put_u32_le(self.event_time_boot_ms);
11926        __tmp.put_u16_le(self.sequence);
11927        __tmp.put_u8(self.destination_component);
11928        __tmp.put_u8(self.destination_system);
11929        __tmp.put_u8(self.log_levels);
11930        for val in &self.arguments {
11931            __tmp.put_u8(*val);
11932        }
11933        if matches!(version, MavlinkVersion::V2) {
11934            let len = __tmp.len();
11935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11936        } else {
11937            __tmp.len()
11938        }
11939    }
11940}
11941#[doc = "Provides state for additional features."]
11942#[doc = ""]
11943#[doc = "ID: 245"]
11944#[derive(Debug, Clone, PartialEq)]
11945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11947#[cfg_attr(feature = "ts", derive(TS))]
11948#[cfg_attr(feature = "ts", ts(export))]
11949pub struct EXTENDED_SYS_STATE_DATA {
11950    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11951    pub vtol_state: MavVtolState,
11952    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11953    pub landed_state: MavLandedState,
11954}
11955impl EXTENDED_SYS_STATE_DATA {
11956    pub const ENCODED_LEN: usize = 2usize;
11957    pub const DEFAULT: Self = Self {
11958        vtol_state: MavVtolState::DEFAULT,
11959        landed_state: MavLandedState::DEFAULT,
11960    };
11961    #[cfg(feature = "arbitrary")]
11962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11963        use arbitrary::{Arbitrary, Unstructured};
11964        let mut buf = [0u8; 1024];
11965        rng.fill_bytes(&mut buf);
11966        let mut unstructured = Unstructured::new(&buf);
11967        Self::arbitrary(&mut unstructured).unwrap_or_default()
11968    }
11969}
11970impl Default for EXTENDED_SYS_STATE_DATA {
11971    fn default() -> Self {
11972        Self::DEFAULT.clone()
11973    }
11974}
11975impl MessageData for EXTENDED_SYS_STATE_DATA {
11976    type Message = MavMessage;
11977    const ID: u32 = 245u32;
11978    const NAME: &'static str = "EXTENDED_SYS_STATE";
11979    const EXTRA_CRC: u8 = 130u8;
11980    const ENCODED_LEN: usize = 2usize;
11981    fn deser(
11982        _version: MavlinkVersion,
11983        __input: &[u8],
11984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11985        let avail_len = __input.len();
11986        let mut payload_buf = [0; Self::ENCODED_LEN];
11987        let mut buf = if avail_len < Self::ENCODED_LEN {
11988            payload_buf[0..avail_len].copy_from_slice(__input);
11989            Bytes::new(&payload_buf)
11990        } else {
11991            Bytes::new(__input)
11992        };
11993        let mut __struct = Self::default();
11994        let tmp = buf.get_u8();
11995        __struct.vtol_state =
11996            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11997                enum_type: "MavVtolState",
11998                value: tmp as u32,
11999            })?;
12000        let tmp = buf.get_u8();
12001        __struct.landed_state =
12002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12003                enum_type: "MavLandedState",
12004                value: tmp as u32,
12005            })?;
12006        Ok(__struct)
12007    }
12008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12009        let mut __tmp = BytesMut::new(bytes);
12010        #[allow(clippy::absurd_extreme_comparisons)]
12011        #[allow(unused_comparisons)]
12012        if __tmp.remaining() < Self::ENCODED_LEN {
12013            panic!(
12014                "buffer is too small (need {} bytes, but got {})",
12015                Self::ENCODED_LEN,
12016                __tmp.remaining(),
12017            )
12018        }
12019        __tmp.put_u8(self.vtol_state as u8);
12020        __tmp.put_u8(self.landed_state as u8);
12021        if matches!(version, MavlinkVersion::V2) {
12022            let len = __tmp.len();
12023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12024        } else {
12025            __tmp.len()
12026        }
12027    }
12028}
12029#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12030#[doc = ""]
12031#[doc = "ID: 162"]
12032#[derive(Debug, Clone, PartialEq)]
12033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12035#[cfg_attr(feature = "ts", derive(TS))]
12036#[cfg_attr(feature = "ts", ts(export))]
12037pub struct FENCE_STATUS_DATA {
12038    #[doc = "Time (since boot) of last breach."]
12039    pub breach_time: u32,
12040    #[doc = "Number of fence breaches."]
12041    pub breach_count: u16,
12042    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12043    pub breach_status: u8,
12044    #[doc = "Last breach type."]
12045    pub breach_type: FenceBreach,
12046    #[doc = "Active action to prevent fence breach"]
12047    #[cfg_attr(feature = "serde", serde(default))]
12048    pub breach_mitigation: FenceMitigate,
12049}
12050impl FENCE_STATUS_DATA {
12051    pub const ENCODED_LEN: usize = 9usize;
12052    pub const DEFAULT: Self = Self {
12053        breach_time: 0_u32,
12054        breach_count: 0_u16,
12055        breach_status: 0_u8,
12056        breach_type: FenceBreach::DEFAULT,
12057        breach_mitigation: FenceMitigate::DEFAULT,
12058    };
12059    #[cfg(feature = "arbitrary")]
12060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12061        use arbitrary::{Arbitrary, Unstructured};
12062        let mut buf = [0u8; 1024];
12063        rng.fill_bytes(&mut buf);
12064        let mut unstructured = Unstructured::new(&buf);
12065        Self::arbitrary(&mut unstructured).unwrap_or_default()
12066    }
12067}
12068impl Default for FENCE_STATUS_DATA {
12069    fn default() -> Self {
12070        Self::DEFAULT.clone()
12071    }
12072}
12073impl MessageData for FENCE_STATUS_DATA {
12074    type Message = MavMessage;
12075    const ID: u32 = 162u32;
12076    const NAME: &'static str = "FENCE_STATUS";
12077    const EXTRA_CRC: u8 = 189u8;
12078    const ENCODED_LEN: usize = 9usize;
12079    fn deser(
12080        _version: MavlinkVersion,
12081        __input: &[u8],
12082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12083        let avail_len = __input.len();
12084        let mut payload_buf = [0; Self::ENCODED_LEN];
12085        let mut buf = if avail_len < Self::ENCODED_LEN {
12086            payload_buf[0..avail_len].copy_from_slice(__input);
12087            Bytes::new(&payload_buf)
12088        } else {
12089            Bytes::new(__input)
12090        };
12091        let mut __struct = Self::default();
12092        __struct.breach_time = buf.get_u32_le();
12093        __struct.breach_count = buf.get_u16_le();
12094        __struct.breach_status = buf.get_u8();
12095        let tmp = buf.get_u8();
12096        __struct.breach_type =
12097            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12098                enum_type: "FenceBreach",
12099                value: tmp as u32,
12100            })?;
12101        let tmp = buf.get_u8();
12102        __struct.breach_mitigation =
12103            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12104                enum_type: "FenceMitigate",
12105                value: tmp as u32,
12106            })?;
12107        Ok(__struct)
12108    }
12109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12110        let mut __tmp = BytesMut::new(bytes);
12111        #[allow(clippy::absurd_extreme_comparisons)]
12112        #[allow(unused_comparisons)]
12113        if __tmp.remaining() < Self::ENCODED_LEN {
12114            panic!(
12115                "buffer is too small (need {} bytes, but got {})",
12116                Self::ENCODED_LEN,
12117                __tmp.remaining(),
12118            )
12119        }
12120        __tmp.put_u32_le(self.breach_time);
12121        __tmp.put_u16_le(self.breach_count);
12122        __tmp.put_u8(self.breach_status);
12123        __tmp.put_u8(self.breach_type as u8);
12124        if matches!(version, MavlinkVersion::V2) {
12125            __tmp.put_u8(self.breach_mitigation as u8);
12126            let len = __tmp.len();
12127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12128        } else {
12129            __tmp.len()
12130        }
12131    }
12132}
12133#[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT).         This may typically send at low rates: of the order of 2Hz."]
12134#[doc = ""]
12135#[doc = "ID: 361"]
12136#[derive(Debug, Clone, PartialEq)]
12137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12139#[cfg_attr(feature = "ts", derive(TS))]
12140#[cfg_attr(feature = "ts", ts(export))]
12141pub struct FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12142    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12143    pub time_usec: u64,
12144    #[doc = "Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise."]
12145    pub major_radius: f32,
12146    #[doc = "Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure."]
12147    pub minor_radius: f32,
12148    #[doc = "Orientation of the figure eight major axis with respect to true north in [-pi,pi)."]
12149    pub orientation: f32,
12150    #[doc = "X coordinate of center point. Coordinate system depends on frame field."]
12151    pub x: i32,
12152    #[doc = "Y coordinate of center point. Coordinate system depends on frame field."]
12153    pub y: i32,
12154    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
12155    pub z: f32,
12156    #[doc = "The coordinate system of the fields: x, y, z."]
12157    pub frame: MavFrame,
12158}
12159impl FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12160    pub const ENCODED_LEN: usize = 33usize;
12161    pub const DEFAULT: Self = Self {
12162        time_usec: 0_u64,
12163        major_radius: 0.0_f32,
12164        minor_radius: 0.0_f32,
12165        orientation: 0.0_f32,
12166        x: 0_i32,
12167        y: 0_i32,
12168        z: 0.0_f32,
12169        frame: MavFrame::DEFAULT,
12170    };
12171    #[cfg(feature = "arbitrary")]
12172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12173        use arbitrary::{Arbitrary, Unstructured};
12174        let mut buf = [0u8; 1024];
12175        rng.fill_bytes(&mut buf);
12176        let mut unstructured = Unstructured::new(&buf);
12177        Self::arbitrary(&mut unstructured).unwrap_or_default()
12178    }
12179}
12180impl Default for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12181    fn default() -> Self {
12182        Self::DEFAULT.clone()
12183    }
12184}
12185impl MessageData for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12186    type Message = MavMessage;
12187    const ID: u32 = 361u32;
12188    const NAME: &'static str = "FIGURE_EIGHT_EXECUTION_STATUS";
12189    const EXTRA_CRC: u8 = 93u8;
12190    const ENCODED_LEN: usize = 33usize;
12191    fn deser(
12192        _version: MavlinkVersion,
12193        __input: &[u8],
12194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12195        let avail_len = __input.len();
12196        let mut payload_buf = [0; Self::ENCODED_LEN];
12197        let mut buf = if avail_len < Self::ENCODED_LEN {
12198            payload_buf[0..avail_len].copy_from_slice(__input);
12199            Bytes::new(&payload_buf)
12200        } else {
12201            Bytes::new(__input)
12202        };
12203        let mut __struct = Self::default();
12204        __struct.time_usec = buf.get_u64_le();
12205        __struct.major_radius = buf.get_f32_le();
12206        __struct.minor_radius = buf.get_f32_le();
12207        __struct.orientation = buf.get_f32_le();
12208        __struct.x = buf.get_i32_le();
12209        __struct.y = buf.get_i32_le();
12210        __struct.z = buf.get_f32_le();
12211        let tmp = buf.get_u8();
12212        __struct.frame =
12213            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12214                enum_type: "MavFrame",
12215                value: tmp as u32,
12216            })?;
12217        Ok(__struct)
12218    }
12219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12220        let mut __tmp = BytesMut::new(bytes);
12221        #[allow(clippy::absurd_extreme_comparisons)]
12222        #[allow(unused_comparisons)]
12223        if __tmp.remaining() < Self::ENCODED_LEN {
12224            panic!(
12225                "buffer is too small (need {} bytes, but got {})",
12226                Self::ENCODED_LEN,
12227                __tmp.remaining(),
12228            )
12229        }
12230        __tmp.put_u64_le(self.time_usec);
12231        __tmp.put_f32_le(self.major_radius);
12232        __tmp.put_f32_le(self.minor_radius);
12233        __tmp.put_f32_le(self.orientation);
12234        __tmp.put_i32_le(self.x);
12235        __tmp.put_i32_le(self.y);
12236        __tmp.put_f32_le(self.z);
12237        __tmp.put_u8(self.frame as u8);
12238        if matches!(version, MavlinkVersion::V2) {
12239            let len = __tmp.len();
12240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12241        } else {
12242            __tmp.len()
12243        }
12244    }
12245}
12246#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12247#[doc = ""]
12248#[doc = "ID: 110"]
12249#[derive(Debug, Clone, PartialEq)]
12250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12252#[cfg_attr(feature = "ts", derive(TS))]
12253#[cfg_attr(feature = "ts", ts(export))]
12254pub struct FILE_TRANSFER_PROTOCOL_DATA {
12255    #[doc = "Network ID (0 for broadcast)"]
12256    pub target_network: u8,
12257    #[doc = "System ID (0 for broadcast)"]
12258    pub target_system: u8,
12259    #[doc = "Component ID (0 for broadcast)"]
12260    pub target_component: u8,
12261    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12262    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12263    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12264    pub payload: [u8; 251],
12265}
12266impl FILE_TRANSFER_PROTOCOL_DATA {
12267    pub const ENCODED_LEN: usize = 254usize;
12268    pub const DEFAULT: Self = Self {
12269        target_network: 0_u8,
12270        target_system: 0_u8,
12271        target_component: 0_u8,
12272        payload: [0_u8; 251usize],
12273    };
12274    #[cfg(feature = "arbitrary")]
12275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12276        use arbitrary::{Arbitrary, Unstructured};
12277        let mut buf = [0u8; 1024];
12278        rng.fill_bytes(&mut buf);
12279        let mut unstructured = Unstructured::new(&buf);
12280        Self::arbitrary(&mut unstructured).unwrap_or_default()
12281    }
12282}
12283impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12284    fn default() -> Self {
12285        Self::DEFAULT.clone()
12286    }
12287}
12288impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12289    type Message = MavMessage;
12290    const ID: u32 = 110u32;
12291    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12292    const EXTRA_CRC: u8 = 84u8;
12293    const ENCODED_LEN: usize = 254usize;
12294    fn deser(
12295        _version: MavlinkVersion,
12296        __input: &[u8],
12297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12298        let avail_len = __input.len();
12299        let mut payload_buf = [0; Self::ENCODED_LEN];
12300        let mut buf = if avail_len < Self::ENCODED_LEN {
12301            payload_buf[0..avail_len].copy_from_slice(__input);
12302            Bytes::new(&payload_buf)
12303        } else {
12304            Bytes::new(__input)
12305        };
12306        let mut __struct = Self::default();
12307        __struct.target_network = buf.get_u8();
12308        __struct.target_system = buf.get_u8();
12309        __struct.target_component = buf.get_u8();
12310        for v in &mut __struct.payload {
12311            let val = buf.get_u8();
12312            *v = val;
12313        }
12314        Ok(__struct)
12315    }
12316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12317        let mut __tmp = BytesMut::new(bytes);
12318        #[allow(clippy::absurd_extreme_comparisons)]
12319        #[allow(unused_comparisons)]
12320        if __tmp.remaining() < Self::ENCODED_LEN {
12321            panic!(
12322                "buffer is too small (need {} bytes, but got {})",
12323                Self::ENCODED_LEN,
12324                __tmp.remaining(),
12325            )
12326        }
12327        __tmp.put_u8(self.target_network);
12328        __tmp.put_u8(self.target_system);
12329        __tmp.put_u8(self.target_component);
12330        for val in &self.payload {
12331            __tmp.put_u8(*val);
12332        }
12333        if matches!(version, MavlinkVersion::V2) {
12334            let len = __tmp.len();
12335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12336        } else {
12337            __tmp.len()
12338        }
12339    }
12340}
12341#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12342#[doc = ""]
12343#[doc = "ID: 264"]
12344#[derive(Debug, Clone, PartialEq)]
12345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12347#[cfg_attr(feature = "ts", derive(TS))]
12348#[cfg_attr(feature = "ts", ts(export))]
12349pub struct FLIGHT_INFORMATION_DATA {
12350    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12351    pub arming_time_utc: u64,
12352    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12353    pub takeoff_time_utc: u64,
12354    #[doc = "Flight number. Note, field is misnamed UUID."]
12355    pub flight_uuid: u64,
12356    #[doc = "Timestamp (time since system boot)."]
12357    pub time_boot_ms: u32,
12358    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12359    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12360    pub landing_time: u32,
12361}
12362impl FLIGHT_INFORMATION_DATA {
12363    pub const ENCODED_LEN: usize = 32usize;
12364    pub const DEFAULT: Self = Self {
12365        arming_time_utc: 0_u64,
12366        takeoff_time_utc: 0_u64,
12367        flight_uuid: 0_u64,
12368        time_boot_ms: 0_u32,
12369        landing_time: 0_u32,
12370    };
12371    #[cfg(feature = "arbitrary")]
12372    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12373        use arbitrary::{Arbitrary, Unstructured};
12374        let mut buf = [0u8; 1024];
12375        rng.fill_bytes(&mut buf);
12376        let mut unstructured = Unstructured::new(&buf);
12377        Self::arbitrary(&mut unstructured).unwrap_or_default()
12378    }
12379}
12380impl Default for FLIGHT_INFORMATION_DATA {
12381    fn default() -> Self {
12382        Self::DEFAULT.clone()
12383    }
12384}
12385impl MessageData for FLIGHT_INFORMATION_DATA {
12386    type Message = MavMessage;
12387    const ID: u32 = 264u32;
12388    const NAME: &'static str = "FLIGHT_INFORMATION";
12389    const EXTRA_CRC: u8 = 49u8;
12390    const ENCODED_LEN: usize = 32usize;
12391    fn deser(
12392        _version: MavlinkVersion,
12393        __input: &[u8],
12394    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12395        let avail_len = __input.len();
12396        let mut payload_buf = [0; Self::ENCODED_LEN];
12397        let mut buf = if avail_len < Self::ENCODED_LEN {
12398            payload_buf[0..avail_len].copy_from_slice(__input);
12399            Bytes::new(&payload_buf)
12400        } else {
12401            Bytes::new(__input)
12402        };
12403        let mut __struct = Self::default();
12404        __struct.arming_time_utc = buf.get_u64_le();
12405        __struct.takeoff_time_utc = buf.get_u64_le();
12406        __struct.flight_uuid = buf.get_u64_le();
12407        __struct.time_boot_ms = buf.get_u32_le();
12408        __struct.landing_time = buf.get_u32_le();
12409        Ok(__struct)
12410    }
12411    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12412        let mut __tmp = BytesMut::new(bytes);
12413        #[allow(clippy::absurd_extreme_comparisons)]
12414        #[allow(unused_comparisons)]
12415        if __tmp.remaining() < Self::ENCODED_LEN {
12416            panic!(
12417                "buffer is too small (need {} bytes, but got {})",
12418                Self::ENCODED_LEN,
12419                __tmp.remaining(),
12420            )
12421        }
12422        __tmp.put_u64_le(self.arming_time_utc);
12423        __tmp.put_u64_le(self.takeoff_time_utc);
12424        __tmp.put_u64_le(self.flight_uuid);
12425        __tmp.put_u32_le(self.time_boot_ms);
12426        if matches!(version, MavlinkVersion::V2) {
12427            __tmp.put_u32_le(self.landing_time);
12428            let len = __tmp.len();
12429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12430        } else {
12431            __tmp.len()
12432        }
12433    }
12434}
12435#[doc = "Current motion information from a designated system."]
12436#[doc = ""]
12437#[doc = "ID: 144"]
12438#[derive(Debug, Clone, PartialEq)]
12439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12440#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12441#[cfg_attr(feature = "ts", derive(TS))]
12442#[cfg_attr(feature = "ts", ts(export))]
12443pub struct FOLLOW_TARGET_DATA {
12444    #[doc = "Timestamp (time since system boot)."]
12445    pub timestamp: u64,
12446    #[doc = "button states or switches of a tracker device"]
12447    pub custom_state: u64,
12448    #[doc = "Latitude (WGS84)"]
12449    pub lat: i32,
12450    #[doc = "Longitude (WGS84)"]
12451    pub lon: i32,
12452    #[doc = "Altitude (MSL)"]
12453    pub alt: f32,
12454    #[doc = "target velocity (0,0,0) for unknown"]
12455    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12456    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12457    pub vel: [f32; 3],
12458    #[doc = "linear target acceleration (0,0,0) for unknown"]
12459    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12460    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12461    pub acc: [f32; 3],
12462    #[doc = "(0 0 0 0 for unknown)"]
12463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12464    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12465    pub attitude_q: [f32; 4],
12466    #[doc = "(0 0 0 for unknown)"]
12467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12468    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12469    pub rates: [f32; 3],
12470    #[doc = "eph epv"]
12471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12472    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12473    pub position_cov: [f32; 3],
12474    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12475    pub est_capabilities: u8,
12476}
12477impl FOLLOW_TARGET_DATA {
12478    pub const ENCODED_LEN: usize = 93usize;
12479    pub const DEFAULT: Self = Self {
12480        timestamp: 0_u64,
12481        custom_state: 0_u64,
12482        lat: 0_i32,
12483        lon: 0_i32,
12484        alt: 0.0_f32,
12485        vel: [0.0_f32; 3usize],
12486        acc: [0.0_f32; 3usize],
12487        attitude_q: [0.0_f32; 4usize],
12488        rates: [0.0_f32; 3usize],
12489        position_cov: [0.0_f32; 3usize],
12490        est_capabilities: 0_u8,
12491    };
12492    #[cfg(feature = "arbitrary")]
12493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12494        use arbitrary::{Arbitrary, Unstructured};
12495        let mut buf = [0u8; 1024];
12496        rng.fill_bytes(&mut buf);
12497        let mut unstructured = Unstructured::new(&buf);
12498        Self::arbitrary(&mut unstructured).unwrap_or_default()
12499    }
12500}
12501impl Default for FOLLOW_TARGET_DATA {
12502    fn default() -> Self {
12503        Self::DEFAULT.clone()
12504    }
12505}
12506impl MessageData for FOLLOW_TARGET_DATA {
12507    type Message = MavMessage;
12508    const ID: u32 = 144u32;
12509    const NAME: &'static str = "FOLLOW_TARGET";
12510    const EXTRA_CRC: u8 = 127u8;
12511    const ENCODED_LEN: usize = 93usize;
12512    fn deser(
12513        _version: MavlinkVersion,
12514        __input: &[u8],
12515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12516        let avail_len = __input.len();
12517        let mut payload_buf = [0; Self::ENCODED_LEN];
12518        let mut buf = if avail_len < Self::ENCODED_LEN {
12519            payload_buf[0..avail_len].copy_from_slice(__input);
12520            Bytes::new(&payload_buf)
12521        } else {
12522            Bytes::new(__input)
12523        };
12524        let mut __struct = Self::default();
12525        __struct.timestamp = buf.get_u64_le();
12526        __struct.custom_state = buf.get_u64_le();
12527        __struct.lat = buf.get_i32_le();
12528        __struct.lon = buf.get_i32_le();
12529        __struct.alt = buf.get_f32_le();
12530        for v in &mut __struct.vel {
12531            let val = buf.get_f32_le();
12532            *v = val;
12533        }
12534        for v in &mut __struct.acc {
12535            let val = buf.get_f32_le();
12536            *v = val;
12537        }
12538        for v in &mut __struct.attitude_q {
12539            let val = buf.get_f32_le();
12540            *v = val;
12541        }
12542        for v in &mut __struct.rates {
12543            let val = buf.get_f32_le();
12544            *v = val;
12545        }
12546        for v in &mut __struct.position_cov {
12547            let val = buf.get_f32_le();
12548            *v = val;
12549        }
12550        __struct.est_capabilities = buf.get_u8();
12551        Ok(__struct)
12552    }
12553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12554        let mut __tmp = BytesMut::new(bytes);
12555        #[allow(clippy::absurd_extreme_comparisons)]
12556        #[allow(unused_comparisons)]
12557        if __tmp.remaining() < Self::ENCODED_LEN {
12558            panic!(
12559                "buffer is too small (need {} bytes, but got {})",
12560                Self::ENCODED_LEN,
12561                __tmp.remaining(),
12562            )
12563        }
12564        __tmp.put_u64_le(self.timestamp);
12565        __tmp.put_u64_le(self.custom_state);
12566        __tmp.put_i32_le(self.lat);
12567        __tmp.put_i32_le(self.lon);
12568        __tmp.put_f32_le(self.alt);
12569        for val in &self.vel {
12570            __tmp.put_f32_le(*val);
12571        }
12572        for val in &self.acc {
12573            __tmp.put_f32_le(*val);
12574        }
12575        for val in &self.attitude_q {
12576            __tmp.put_f32_le(*val);
12577        }
12578        for val in &self.rates {
12579            __tmp.put_f32_le(*val);
12580        }
12581        for val in &self.position_cov {
12582            __tmp.put_f32_le(*val);
12583        }
12584        __tmp.put_u8(self.est_capabilities);
12585        if matches!(version, MavlinkVersion::V2) {
12586            let len = __tmp.len();
12587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12588        } else {
12589            __tmp.len()
12590        }
12591    }
12592}
12593#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12594#[doc = ""]
12595#[doc = "ID: 371"]
12596#[derive(Debug, Clone, PartialEq)]
12597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12599#[cfg_attr(feature = "ts", derive(TS))]
12600#[cfg_attr(feature = "ts", ts(export))]
12601pub struct FUEL_STATUS_DATA {
12602    #[doc = "Capacity when full. Must be provided."]
12603    pub maximum_fuel: f32,
12604    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12605    pub consumed_fuel: f32,
12606    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12607    pub remaining_fuel: f32,
12608    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12609    pub flow_rate: f32,
12610    #[doc = "Fuel temperature. NaN: field not provided."]
12611    pub temperature: f32,
12612    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12613    pub fuel_type: MavFuelType,
12614    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12615    pub id: u8,
12616    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12617    pub percent_remaining: u8,
12618}
12619impl FUEL_STATUS_DATA {
12620    pub const ENCODED_LEN: usize = 26usize;
12621    pub const DEFAULT: Self = Self {
12622        maximum_fuel: 0.0_f32,
12623        consumed_fuel: 0.0_f32,
12624        remaining_fuel: 0.0_f32,
12625        flow_rate: 0.0_f32,
12626        temperature: 0.0_f32,
12627        fuel_type: MavFuelType::DEFAULT,
12628        id: 0_u8,
12629        percent_remaining: 0_u8,
12630    };
12631    #[cfg(feature = "arbitrary")]
12632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12633        use arbitrary::{Arbitrary, Unstructured};
12634        let mut buf = [0u8; 1024];
12635        rng.fill_bytes(&mut buf);
12636        let mut unstructured = Unstructured::new(&buf);
12637        Self::arbitrary(&mut unstructured).unwrap_or_default()
12638    }
12639}
12640impl Default for FUEL_STATUS_DATA {
12641    fn default() -> Self {
12642        Self::DEFAULT.clone()
12643    }
12644}
12645impl MessageData for FUEL_STATUS_DATA {
12646    type Message = MavMessage;
12647    const ID: u32 = 371u32;
12648    const NAME: &'static str = "FUEL_STATUS";
12649    const EXTRA_CRC: u8 = 10u8;
12650    const ENCODED_LEN: usize = 26usize;
12651    fn deser(
12652        _version: MavlinkVersion,
12653        __input: &[u8],
12654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12655        let avail_len = __input.len();
12656        let mut payload_buf = [0; Self::ENCODED_LEN];
12657        let mut buf = if avail_len < Self::ENCODED_LEN {
12658            payload_buf[0..avail_len].copy_from_slice(__input);
12659            Bytes::new(&payload_buf)
12660        } else {
12661            Bytes::new(__input)
12662        };
12663        let mut __struct = Self::default();
12664        __struct.maximum_fuel = buf.get_f32_le();
12665        __struct.consumed_fuel = buf.get_f32_le();
12666        __struct.remaining_fuel = buf.get_f32_le();
12667        __struct.flow_rate = buf.get_f32_le();
12668        __struct.temperature = buf.get_f32_le();
12669        let tmp = buf.get_u32_le();
12670        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12671            ::mavlink_core::error::ParserError::InvalidEnum {
12672                enum_type: "MavFuelType",
12673                value: tmp as u32,
12674            },
12675        )?;
12676        __struct.id = buf.get_u8();
12677        __struct.percent_remaining = buf.get_u8();
12678        Ok(__struct)
12679    }
12680    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12681        let mut __tmp = BytesMut::new(bytes);
12682        #[allow(clippy::absurd_extreme_comparisons)]
12683        #[allow(unused_comparisons)]
12684        if __tmp.remaining() < Self::ENCODED_LEN {
12685            panic!(
12686                "buffer is too small (need {} bytes, but got {})",
12687                Self::ENCODED_LEN,
12688                __tmp.remaining(),
12689            )
12690        }
12691        __tmp.put_f32_le(self.maximum_fuel);
12692        __tmp.put_f32_le(self.consumed_fuel);
12693        __tmp.put_f32_le(self.remaining_fuel);
12694        __tmp.put_f32_le(self.flow_rate);
12695        __tmp.put_f32_le(self.temperature);
12696        __tmp.put_u32_le(self.fuel_type as u32);
12697        __tmp.put_u8(self.id);
12698        __tmp.put_u8(self.percent_remaining);
12699        if matches!(version, MavlinkVersion::V2) {
12700            let len = __tmp.len();
12701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12702        } else {
12703            __tmp.len()
12704        }
12705    }
12706}
12707#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12708#[doc = ""]
12709#[doc = "ID: 373"]
12710#[derive(Debug, Clone, PartialEq)]
12711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12713#[cfg_attr(feature = "ts", derive(TS))]
12714#[cfg_attr(feature = "ts", ts(export))]
12715pub struct GENERATOR_STATUS_DATA {
12716    #[doc = "Status flags."]
12717    pub status: MavGeneratorStatusFlag,
12718    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12719    pub battery_current: f32,
12720    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12721    pub load_current: f32,
12722    #[doc = "The power being generated. NaN: field not provided"]
12723    pub power_generated: f32,
12724    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12725    pub bus_voltage: f32,
12726    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12727    pub bat_current_setpoint: f32,
12728    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12729    pub runtime: u32,
12730    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12731    pub time_until_maintenance: i32,
12732    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12733    pub generator_speed: u16,
12734    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12735    pub rectifier_temperature: i16,
12736    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12737    pub generator_temperature: i16,
12738}
12739impl GENERATOR_STATUS_DATA {
12740    pub const ENCODED_LEN: usize = 42usize;
12741    pub const DEFAULT: Self = Self {
12742        status: MavGeneratorStatusFlag::DEFAULT,
12743        battery_current: 0.0_f32,
12744        load_current: 0.0_f32,
12745        power_generated: 0.0_f32,
12746        bus_voltage: 0.0_f32,
12747        bat_current_setpoint: 0.0_f32,
12748        runtime: 0_u32,
12749        time_until_maintenance: 0_i32,
12750        generator_speed: 0_u16,
12751        rectifier_temperature: 0_i16,
12752        generator_temperature: 0_i16,
12753    };
12754    #[cfg(feature = "arbitrary")]
12755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12756        use arbitrary::{Arbitrary, Unstructured};
12757        let mut buf = [0u8; 1024];
12758        rng.fill_bytes(&mut buf);
12759        let mut unstructured = Unstructured::new(&buf);
12760        Self::arbitrary(&mut unstructured).unwrap_or_default()
12761    }
12762}
12763impl Default for GENERATOR_STATUS_DATA {
12764    fn default() -> Self {
12765        Self::DEFAULT.clone()
12766    }
12767}
12768impl MessageData for GENERATOR_STATUS_DATA {
12769    type Message = MavMessage;
12770    const ID: u32 = 373u32;
12771    const NAME: &'static str = "GENERATOR_STATUS";
12772    const EXTRA_CRC: u8 = 117u8;
12773    const ENCODED_LEN: usize = 42usize;
12774    fn deser(
12775        _version: MavlinkVersion,
12776        __input: &[u8],
12777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12778        let avail_len = __input.len();
12779        let mut payload_buf = [0; Self::ENCODED_LEN];
12780        let mut buf = if avail_len < Self::ENCODED_LEN {
12781            payload_buf[0..avail_len].copy_from_slice(__input);
12782            Bytes::new(&payload_buf)
12783        } else {
12784            Bytes::new(__input)
12785        };
12786        let mut __struct = Self::default();
12787        let tmp = buf.get_u64_le();
12788        __struct.status = MavGeneratorStatusFlag::from_bits(
12789            tmp & MavGeneratorStatusFlag::all().bits(),
12790        )
12791        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12792            flag_type: "MavGeneratorStatusFlag",
12793            value: tmp as u32,
12794        })?;
12795        __struct.battery_current = buf.get_f32_le();
12796        __struct.load_current = buf.get_f32_le();
12797        __struct.power_generated = buf.get_f32_le();
12798        __struct.bus_voltage = buf.get_f32_le();
12799        __struct.bat_current_setpoint = buf.get_f32_le();
12800        __struct.runtime = buf.get_u32_le();
12801        __struct.time_until_maintenance = buf.get_i32_le();
12802        __struct.generator_speed = buf.get_u16_le();
12803        __struct.rectifier_temperature = buf.get_i16_le();
12804        __struct.generator_temperature = buf.get_i16_le();
12805        Ok(__struct)
12806    }
12807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12808        let mut __tmp = BytesMut::new(bytes);
12809        #[allow(clippy::absurd_extreme_comparisons)]
12810        #[allow(unused_comparisons)]
12811        if __tmp.remaining() < Self::ENCODED_LEN {
12812            panic!(
12813                "buffer is too small (need {} bytes, but got {})",
12814                Self::ENCODED_LEN,
12815                __tmp.remaining(),
12816            )
12817        }
12818        __tmp.put_u64_le(self.status.bits());
12819        __tmp.put_f32_le(self.battery_current);
12820        __tmp.put_f32_le(self.load_current);
12821        __tmp.put_f32_le(self.power_generated);
12822        __tmp.put_f32_le(self.bus_voltage);
12823        __tmp.put_f32_le(self.bat_current_setpoint);
12824        __tmp.put_u32_le(self.runtime);
12825        __tmp.put_i32_le(self.time_until_maintenance);
12826        __tmp.put_u16_le(self.generator_speed);
12827        __tmp.put_i16_le(self.rectifier_temperature);
12828        __tmp.put_i16_le(self.generator_temperature);
12829        if matches!(version, MavlinkVersion::V2) {
12830            let len = __tmp.len();
12831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12832        } else {
12833            __tmp.len()
12834        }
12835    }
12836}
12837#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12838#[doc = ""]
12839#[doc = "ID: 285"]
12840#[derive(Debug, Clone, PartialEq)]
12841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12843#[cfg_attr(feature = "ts", derive(TS))]
12844#[cfg_attr(feature = "ts", ts(export))]
12845pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12846    #[doc = "Timestamp (time since system boot)."]
12847    pub time_boot_ms: u32,
12848    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12850    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12851    pub q: [f32; 4],
12852    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12853    pub angular_velocity_x: f32,
12854    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12855    pub angular_velocity_y: f32,
12856    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12857    pub angular_velocity_z: f32,
12858    #[doc = "Failure flags (0 for no failure)"]
12859    pub failure_flags: GimbalDeviceErrorFlags,
12860    #[doc = "Current gimbal flags set."]
12861    pub flags: GimbalDeviceFlags,
12862    #[doc = "System ID"]
12863    pub target_system: u8,
12864    #[doc = "Component ID"]
12865    pub target_component: u8,
12866    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12867    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12868    pub delta_yaw: f32,
12869    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12870    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12871    pub delta_yaw_velocity: f32,
12872    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12873    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12874    pub gimbal_device_id: u8,
12875}
12876impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12877    pub const ENCODED_LEN: usize = 49usize;
12878    pub const DEFAULT: Self = Self {
12879        time_boot_ms: 0_u32,
12880        q: [0.0_f32; 4usize],
12881        angular_velocity_x: 0.0_f32,
12882        angular_velocity_y: 0.0_f32,
12883        angular_velocity_z: 0.0_f32,
12884        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12885        flags: GimbalDeviceFlags::DEFAULT,
12886        target_system: 0_u8,
12887        target_component: 0_u8,
12888        delta_yaw: 0.0_f32,
12889        delta_yaw_velocity: 0.0_f32,
12890        gimbal_device_id: 0_u8,
12891    };
12892    #[cfg(feature = "arbitrary")]
12893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12894        use arbitrary::{Arbitrary, Unstructured};
12895        let mut buf = [0u8; 1024];
12896        rng.fill_bytes(&mut buf);
12897        let mut unstructured = Unstructured::new(&buf);
12898        Self::arbitrary(&mut unstructured).unwrap_or_default()
12899    }
12900}
12901impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12902    fn default() -> Self {
12903        Self::DEFAULT.clone()
12904    }
12905}
12906impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12907    type Message = MavMessage;
12908    const ID: u32 = 285u32;
12909    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12910    const EXTRA_CRC: u8 = 137u8;
12911    const ENCODED_LEN: usize = 49usize;
12912    fn deser(
12913        _version: MavlinkVersion,
12914        __input: &[u8],
12915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12916        let avail_len = __input.len();
12917        let mut payload_buf = [0; Self::ENCODED_LEN];
12918        let mut buf = if avail_len < Self::ENCODED_LEN {
12919            payload_buf[0..avail_len].copy_from_slice(__input);
12920            Bytes::new(&payload_buf)
12921        } else {
12922            Bytes::new(__input)
12923        };
12924        let mut __struct = Self::default();
12925        __struct.time_boot_ms = buf.get_u32_le();
12926        for v in &mut __struct.q {
12927            let val = buf.get_f32_le();
12928            *v = val;
12929        }
12930        __struct.angular_velocity_x = buf.get_f32_le();
12931        __struct.angular_velocity_y = buf.get_f32_le();
12932        __struct.angular_velocity_z = buf.get_f32_le();
12933        let tmp = buf.get_u32_le();
12934        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12935            tmp & GimbalDeviceErrorFlags::all().bits(),
12936        )
12937        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12938            flag_type: "GimbalDeviceErrorFlags",
12939            value: tmp as u32,
12940        })?;
12941        let tmp = buf.get_u16_le();
12942        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12943            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12944                flag_type: "GimbalDeviceFlags",
12945                value: tmp as u32,
12946            })?;
12947        __struct.target_system = buf.get_u8();
12948        __struct.target_component = buf.get_u8();
12949        __struct.delta_yaw = buf.get_f32_le();
12950        __struct.delta_yaw_velocity = buf.get_f32_le();
12951        __struct.gimbal_device_id = buf.get_u8();
12952        Ok(__struct)
12953    }
12954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12955        let mut __tmp = BytesMut::new(bytes);
12956        #[allow(clippy::absurd_extreme_comparisons)]
12957        #[allow(unused_comparisons)]
12958        if __tmp.remaining() < Self::ENCODED_LEN {
12959            panic!(
12960                "buffer is too small (need {} bytes, but got {})",
12961                Self::ENCODED_LEN,
12962                __tmp.remaining(),
12963            )
12964        }
12965        __tmp.put_u32_le(self.time_boot_ms);
12966        for val in &self.q {
12967            __tmp.put_f32_le(*val);
12968        }
12969        __tmp.put_f32_le(self.angular_velocity_x);
12970        __tmp.put_f32_le(self.angular_velocity_y);
12971        __tmp.put_f32_le(self.angular_velocity_z);
12972        __tmp.put_u32_le(self.failure_flags.bits());
12973        __tmp.put_u16_le(self.flags.bits());
12974        __tmp.put_u8(self.target_system);
12975        __tmp.put_u8(self.target_component);
12976        if matches!(version, MavlinkVersion::V2) {
12977            __tmp.put_f32_le(self.delta_yaw);
12978            __tmp.put_f32_le(self.delta_yaw_velocity);
12979            __tmp.put_u8(self.gimbal_device_id);
12980            let len = __tmp.len();
12981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12982        } else {
12983            __tmp.len()
12984        }
12985    }
12986}
12987#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12988#[doc = ""]
12989#[doc = "ID: 283"]
12990#[derive(Debug, Clone, PartialEq)]
12991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12993#[cfg_attr(feature = "ts", derive(TS))]
12994#[cfg_attr(feature = "ts", ts(export))]
12995pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12996    #[doc = "UID of gimbal hardware (0 if unknown)."]
12997    pub uid: u64,
12998    #[doc = "Timestamp (time since system boot)."]
12999    pub time_boot_ms: u32,
13000    #[doc = "0xff)."]
13001    pub firmware_version: u32,
13002    #[doc = "0xff)."]
13003    pub hardware_version: u32,
13004    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13005    pub roll_min: f32,
13006    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13007    pub roll_max: f32,
13008    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13009    pub pitch_min: f32,
13010    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13011    pub pitch_max: f32,
13012    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13013    pub yaw_min: f32,
13014    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13015    pub yaw_max: f32,
13016    #[doc = "Bitmap of gimbal capability flags."]
13017    pub cap_flags: GimbalDeviceCapFlags,
13018    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13019    pub custom_cap_flags: u16,
13020    #[doc = "Name of the gimbal vendor."]
13021    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13022    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13023    pub vendor_name: [u8; 32],
13024    #[doc = "Name of the gimbal model."]
13025    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13026    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13027    pub model_name: [u8; 32],
13028    #[doc = "Custom name of the gimbal given to it by the user."]
13029    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13030    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13031    pub custom_name: [u8; 32],
13032    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13033    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13034    pub gimbal_device_id: u8,
13035}
13036impl GIMBAL_DEVICE_INFORMATION_DATA {
13037    pub const ENCODED_LEN: usize = 145usize;
13038    pub const DEFAULT: Self = Self {
13039        uid: 0_u64,
13040        time_boot_ms: 0_u32,
13041        firmware_version: 0_u32,
13042        hardware_version: 0_u32,
13043        roll_min: 0.0_f32,
13044        roll_max: 0.0_f32,
13045        pitch_min: 0.0_f32,
13046        pitch_max: 0.0_f32,
13047        yaw_min: 0.0_f32,
13048        yaw_max: 0.0_f32,
13049        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13050        custom_cap_flags: 0_u16,
13051        vendor_name: [0_u8; 32usize],
13052        model_name: [0_u8; 32usize],
13053        custom_name: [0_u8; 32usize],
13054        gimbal_device_id: 0_u8,
13055    };
13056    #[cfg(feature = "arbitrary")]
13057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13058        use arbitrary::{Arbitrary, Unstructured};
13059        let mut buf = [0u8; 1024];
13060        rng.fill_bytes(&mut buf);
13061        let mut unstructured = Unstructured::new(&buf);
13062        Self::arbitrary(&mut unstructured).unwrap_or_default()
13063    }
13064}
13065impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13066    fn default() -> Self {
13067        Self::DEFAULT.clone()
13068    }
13069}
13070impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13071    type Message = MavMessage;
13072    const ID: u32 = 283u32;
13073    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13074    const EXTRA_CRC: u8 = 74u8;
13075    const ENCODED_LEN: usize = 145usize;
13076    fn deser(
13077        _version: MavlinkVersion,
13078        __input: &[u8],
13079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13080        let avail_len = __input.len();
13081        let mut payload_buf = [0; Self::ENCODED_LEN];
13082        let mut buf = if avail_len < Self::ENCODED_LEN {
13083            payload_buf[0..avail_len].copy_from_slice(__input);
13084            Bytes::new(&payload_buf)
13085        } else {
13086            Bytes::new(__input)
13087        };
13088        let mut __struct = Self::default();
13089        __struct.uid = buf.get_u64_le();
13090        __struct.time_boot_ms = buf.get_u32_le();
13091        __struct.firmware_version = buf.get_u32_le();
13092        __struct.hardware_version = buf.get_u32_le();
13093        __struct.roll_min = buf.get_f32_le();
13094        __struct.roll_max = buf.get_f32_le();
13095        __struct.pitch_min = buf.get_f32_le();
13096        __struct.pitch_max = buf.get_f32_le();
13097        __struct.yaw_min = buf.get_f32_le();
13098        __struct.yaw_max = buf.get_f32_le();
13099        let tmp = buf.get_u16_le();
13100        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
13101            tmp & GimbalDeviceCapFlags::all().bits(),
13102        )
13103        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13104            flag_type: "GimbalDeviceCapFlags",
13105            value: tmp as u32,
13106        })?;
13107        __struct.custom_cap_flags = buf.get_u16_le();
13108        for v in &mut __struct.vendor_name {
13109            let val = buf.get_u8();
13110            *v = val;
13111        }
13112        for v in &mut __struct.model_name {
13113            let val = buf.get_u8();
13114            *v = val;
13115        }
13116        for v in &mut __struct.custom_name {
13117            let val = buf.get_u8();
13118            *v = val;
13119        }
13120        __struct.gimbal_device_id = buf.get_u8();
13121        Ok(__struct)
13122    }
13123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13124        let mut __tmp = BytesMut::new(bytes);
13125        #[allow(clippy::absurd_extreme_comparisons)]
13126        #[allow(unused_comparisons)]
13127        if __tmp.remaining() < Self::ENCODED_LEN {
13128            panic!(
13129                "buffer is too small (need {} bytes, but got {})",
13130                Self::ENCODED_LEN,
13131                __tmp.remaining(),
13132            )
13133        }
13134        __tmp.put_u64_le(self.uid);
13135        __tmp.put_u32_le(self.time_boot_ms);
13136        __tmp.put_u32_le(self.firmware_version);
13137        __tmp.put_u32_le(self.hardware_version);
13138        __tmp.put_f32_le(self.roll_min);
13139        __tmp.put_f32_le(self.roll_max);
13140        __tmp.put_f32_le(self.pitch_min);
13141        __tmp.put_f32_le(self.pitch_max);
13142        __tmp.put_f32_le(self.yaw_min);
13143        __tmp.put_f32_le(self.yaw_max);
13144        __tmp.put_u16_le(self.cap_flags.bits());
13145        __tmp.put_u16_le(self.custom_cap_flags);
13146        for val in &self.vendor_name {
13147            __tmp.put_u8(*val);
13148        }
13149        for val in &self.model_name {
13150            __tmp.put_u8(*val);
13151        }
13152        for val in &self.custom_name {
13153            __tmp.put_u8(*val);
13154        }
13155        if matches!(version, MavlinkVersion::V2) {
13156            __tmp.put_u8(self.gimbal_device_id);
13157            let len = __tmp.len();
13158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13159        } else {
13160            __tmp.len()
13161        }
13162    }
13163}
13164#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13165#[doc = ""]
13166#[doc = "ID: 284"]
13167#[derive(Debug, Clone, PartialEq)]
13168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13170#[cfg_attr(feature = "ts", derive(TS))]
13171#[cfg_attr(feature = "ts", ts(export))]
13172pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13173    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13175    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13176    pub q: [f32; 4],
13177    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13178    pub angular_velocity_x: f32,
13179    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13180    pub angular_velocity_y: f32,
13181    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13182    pub angular_velocity_z: f32,
13183    #[doc = "Low level gimbal flags."]
13184    pub flags: GimbalDeviceFlags,
13185    #[doc = "System ID"]
13186    pub target_system: u8,
13187    #[doc = "Component ID"]
13188    pub target_component: u8,
13189}
13190impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13191    pub const ENCODED_LEN: usize = 32usize;
13192    pub const DEFAULT: Self = Self {
13193        q: [0.0_f32; 4usize],
13194        angular_velocity_x: 0.0_f32,
13195        angular_velocity_y: 0.0_f32,
13196        angular_velocity_z: 0.0_f32,
13197        flags: GimbalDeviceFlags::DEFAULT,
13198        target_system: 0_u8,
13199        target_component: 0_u8,
13200    };
13201    #[cfg(feature = "arbitrary")]
13202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13203        use arbitrary::{Arbitrary, Unstructured};
13204        let mut buf = [0u8; 1024];
13205        rng.fill_bytes(&mut buf);
13206        let mut unstructured = Unstructured::new(&buf);
13207        Self::arbitrary(&mut unstructured).unwrap_or_default()
13208    }
13209}
13210impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13211    fn default() -> Self {
13212        Self::DEFAULT.clone()
13213    }
13214}
13215impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13216    type Message = MavMessage;
13217    const ID: u32 = 284u32;
13218    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13219    const EXTRA_CRC: u8 = 99u8;
13220    const ENCODED_LEN: usize = 32usize;
13221    fn deser(
13222        _version: MavlinkVersion,
13223        __input: &[u8],
13224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13225        let avail_len = __input.len();
13226        let mut payload_buf = [0; Self::ENCODED_LEN];
13227        let mut buf = if avail_len < Self::ENCODED_LEN {
13228            payload_buf[0..avail_len].copy_from_slice(__input);
13229            Bytes::new(&payload_buf)
13230        } else {
13231            Bytes::new(__input)
13232        };
13233        let mut __struct = Self::default();
13234        for v in &mut __struct.q {
13235            let val = buf.get_f32_le();
13236            *v = val;
13237        }
13238        __struct.angular_velocity_x = buf.get_f32_le();
13239        __struct.angular_velocity_y = buf.get_f32_le();
13240        __struct.angular_velocity_z = buf.get_f32_le();
13241        let tmp = buf.get_u16_le();
13242        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13243            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13244                flag_type: "GimbalDeviceFlags",
13245                value: tmp as u32,
13246            })?;
13247        __struct.target_system = buf.get_u8();
13248        __struct.target_component = buf.get_u8();
13249        Ok(__struct)
13250    }
13251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13252        let mut __tmp = BytesMut::new(bytes);
13253        #[allow(clippy::absurd_extreme_comparisons)]
13254        #[allow(unused_comparisons)]
13255        if __tmp.remaining() < Self::ENCODED_LEN {
13256            panic!(
13257                "buffer is too small (need {} bytes, but got {})",
13258                Self::ENCODED_LEN,
13259                __tmp.remaining(),
13260            )
13261        }
13262        for val in &self.q {
13263            __tmp.put_f32_le(*val);
13264        }
13265        __tmp.put_f32_le(self.angular_velocity_x);
13266        __tmp.put_f32_le(self.angular_velocity_y);
13267        __tmp.put_f32_le(self.angular_velocity_z);
13268        __tmp.put_u16_le(self.flags.bits());
13269        __tmp.put_u8(self.target_system);
13270        __tmp.put_u8(self.target_component);
13271        if matches!(version, MavlinkVersion::V2) {
13272            let len = __tmp.len();
13273            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13274        } else {
13275            __tmp.len()
13276        }
13277    }
13278}
13279#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13280#[doc = ""]
13281#[doc = "ID: 280"]
13282#[derive(Debug, Clone, PartialEq)]
13283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13284#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13285#[cfg_attr(feature = "ts", derive(TS))]
13286#[cfg_attr(feature = "ts", ts(export))]
13287pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13288    #[doc = "Timestamp (time since system boot)."]
13289    pub time_boot_ms: u32,
13290    #[doc = "Bitmap of gimbal capability flags."]
13291    pub cap_flags: GimbalManagerCapFlags,
13292    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13293    pub roll_min: f32,
13294    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13295    pub roll_max: f32,
13296    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13297    pub pitch_min: f32,
13298    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13299    pub pitch_max: f32,
13300    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13301    pub yaw_min: f32,
13302    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13303    pub yaw_max: f32,
13304    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13305    pub gimbal_device_id: u8,
13306}
13307impl GIMBAL_MANAGER_INFORMATION_DATA {
13308    pub const ENCODED_LEN: usize = 33usize;
13309    pub const DEFAULT: Self = Self {
13310        time_boot_ms: 0_u32,
13311        cap_flags: GimbalManagerCapFlags::DEFAULT,
13312        roll_min: 0.0_f32,
13313        roll_max: 0.0_f32,
13314        pitch_min: 0.0_f32,
13315        pitch_max: 0.0_f32,
13316        yaw_min: 0.0_f32,
13317        yaw_max: 0.0_f32,
13318        gimbal_device_id: 0_u8,
13319    };
13320    #[cfg(feature = "arbitrary")]
13321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13322        use arbitrary::{Arbitrary, Unstructured};
13323        let mut buf = [0u8; 1024];
13324        rng.fill_bytes(&mut buf);
13325        let mut unstructured = Unstructured::new(&buf);
13326        Self::arbitrary(&mut unstructured).unwrap_or_default()
13327    }
13328}
13329impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13330    fn default() -> Self {
13331        Self::DEFAULT.clone()
13332    }
13333}
13334impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13335    type Message = MavMessage;
13336    const ID: u32 = 280u32;
13337    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13338    const EXTRA_CRC: u8 = 70u8;
13339    const ENCODED_LEN: usize = 33usize;
13340    fn deser(
13341        _version: MavlinkVersion,
13342        __input: &[u8],
13343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13344        let avail_len = __input.len();
13345        let mut payload_buf = [0; Self::ENCODED_LEN];
13346        let mut buf = if avail_len < Self::ENCODED_LEN {
13347            payload_buf[0..avail_len].copy_from_slice(__input);
13348            Bytes::new(&payload_buf)
13349        } else {
13350            Bytes::new(__input)
13351        };
13352        let mut __struct = Self::default();
13353        __struct.time_boot_ms = buf.get_u32_le();
13354        let tmp = buf.get_u32_le();
13355        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13356            tmp & GimbalManagerCapFlags::all().bits(),
13357        )
13358        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13359            flag_type: "GimbalManagerCapFlags",
13360            value: tmp as u32,
13361        })?;
13362        __struct.roll_min = buf.get_f32_le();
13363        __struct.roll_max = buf.get_f32_le();
13364        __struct.pitch_min = buf.get_f32_le();
13365        __struct.pitch_max = buf.get_f32_le();
13366        __struct.yaw_min = buf.get_f32_le();
13367        __struct.yaw_max = buf.get_f32_le();
13368        __struct.gimbal_device_id = buf.get_u8();
13369        Ok(__struct)
13370    }
13371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13372        let mut __tmp = BytesMut::new(bytes);
13373        #[allow(clippy::absurd_extreme_comparisons)]
13374        #[allow(unused_comparisons)]
13375        if __tmp.remaining() < Self::ENCODED_LEN {
13376            panic!(
13377                "buffer is too small (need {} bytes, but got {})",
13378                Self::ENCODED_LEN,
13379                __tmp.remaining(),
13380            )
13381        }
13382        __tmp.put_u32_le(self.time_boot_ms);
13383        __tmp.put_u32_le(self.cap_flags.bits());
13384        __tmp.put_f32_le(self.roll_min);
13385        __tmp.put_f32_le(self.roll_max);
13386        __tmp.put_f32_le(self.pitch_min);
13387        __tmp.put_f32_le(self.pitch_max);
13388        __tmp.put_f32_le(self.yaw_min);
13389        __tmp.put_f32_le(self.yaw_max);
13390        __tmp.put_u8(self.gimbal_device_id);
13391        if matches!(version, MavlinkVersion::V2) {
13392            let len = __tmp.len();
13393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13394        } else {
13395            __tmp.len()
13396        }
13397    }
13398}
13399#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13400#[doc = ""]
13401#[doc = "ID: 282"]
13402#[derive(Debug, Clone, PartialEq)]
13403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13405#[cfg_attr(feature = "ts", derive(TS))]
13406#[cfg_attr(feature = "ts", ts(export))]
13407pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13408    #[doc = "High level gimbal manager flags to use."]
13409    pub flags: GimbalManagerFlags,
13410    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13412    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13413    pub q: [f32; 4],
13414    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13415    pub angular_velocity_x: f32,
13416    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13417    pub angular_velocity_y: f32,
13418    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13419    pub angular_velocity_z: f32,
13420    #[doc = "System ID"]
13421    pub target_system: u8,
13422    #[doc = "Component ID"]
13423    pub target_component: u8,
13424    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13425    pub gimbal_device_id: u8,
13426}
13427impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13428    pub const ENCODED_LEN: usize = 35usize;
13429    pub const DEFAULT: Self = Self {
13430        flags: GimbalManagerFlags::DEFAULT,
13431        q: [0.0_f32; 4usize],
13432        angular_velocity_x: 0.0_f32,
13433        angular_velocity_y: 0.0_f32,
13434        angular_velocity_z: 0.0_f32,
13435        target_system: 0_u8,
13436        target_component: 0_u8,
13437        gimbal_device_id: 0_u8,
13438    };
13439    #[cfg(feature = "arbitrary")]
13440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13441        use arbitrary::{Arbitrary, Unstructured};
13442        let mut buf = [0u8; 1024];
13443        rng.fill_bytes(&mut buf);
13444        let mut unstructured = Unstructured::new(&buf);
13445        Self::arbitrary(&mut unstructured).unwrap_or_default()
13446    }
13447}
13448impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13449    fn default() -> Self {
13450        Self::DEFAULT.clone()
13451    }
13452}
13453impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13454    type Message = MavMessage;
13455    const ID: u32 = 282u32;
13456    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13457    const EXTRA_CRC: u8 = 123u8;
13458    const ENCODED_LEN: usize = 35usize;
13459    fn deser(
13460        _version: MavlinkVersion,
13461        __input: &[u8],
13462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13463        let avail_len = __input.len();
13464        let mut payload_buf = [0; Self::ENCODED_LEN];
13465        let mut buf = if avail_len < Self::ENCODED_LEN {
13466            payload_buf[0..avail_len].copy_from_slice(__input);
13467            Bytes::new(&payload_buf)
13468        } else {
13469            Bytes::new(__input)
13470        };
13471        let mut __struct = Self::default();
13472        let tmp = buf.get_u32_le();
13473        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13474            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13475                flag_type: "GimbalManagerFlags",
13476                value: tmp as u32,
13477            })?;
13478        for v in &mut __struct.q {
13479            let val = buf.get_f32_le();
13480            *v = val;
13481        }
13482        __struct.angular_velocity_x = buf.get_f32_le();
13483        __struct.angular_velocity_y = buf.get_f32_le();
13484        __struct.angular_velocity_z = buf.get_f32_le();
13485        __struct.target_system = buf.get_u8();
13486        __struct.target_component = buf.get_u8();
13487        __struct.gimbal_device_id = buf.get_u8();
13488        Ok(__struct)
13489    }
13490    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13491        let mut __tmp = BytesMut::new(bytes);
13492        #[allow(clippy::absurd_extreme_comparisons)]
13493        #[allow(unused_comparisons)]
13494        if __tmp.remaining() < Self::ENCODED_LEN {
13495            panic!(
13496                "buffer is too small (need {} bytes, but got {})",
13497                Self::ENCODED_LEN,
13498                __tmp.remaining(),
13499            )
13500        }
13501        __tmp.put_u32_le(self.flags.bits());
13502        for val in &self.q {
13503            __tmp.put_f32_le(*val);
13504        }
13505        __tmp.put_f32_le(self.angular_velocity_x);
13506        __tmp.put_f32_le(self.angular_velocity_y);
13507        __tmp.put_f32_le(self.angular_velocity_z);
13508        __tmp.put_u8(self.target_system);
13509        __tmp.put_u8(self.target_component);
13510        __tmp.put_u8(self.gimbal_device_id);
13511        if matches!(version, MavlinkVersion::V2) {
13512            let len = __tmp.len();
13513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13514        } else {
13515            __tmp.len()
13516        }
13517    }
13518}
13519#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13520#[doc = ""]
13521#[doc = "ID: 288"]
13522#[derive(Debug, Clone, PartialEq)]
13523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13525#[cfg_attr(feature = "ts", derive(TS))]
13526#[cfg_attr(feature = "ts", ts(export))]
13527pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13528    #[doc = "High level gimbal manager flags."]
13529    pub flags: GimbalManagerFlags,
13530    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13531    pub pitch: f32,
13532    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13533    pub yaw: f32,
13534    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13535    pub pitch_rate: f32,
13536    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13537    pub yaw_rate: f32,
13538    #[doc = "System ID"]
13539    pub target_system: u8,
13540    #[doc = "Component ID"]
13541    pub target_component: u8,
13542    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13543    pub gimbal_device_id: u8,
13544}
13545impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13546    pub const ENCODED_LEN: usize = 23usize;
13547    pub const DEFAULT: Self = Self {
13548        flags: GimbalManagerFlags::DEFAULT,
13549        pitch: 0.0_f32,
13550        yaw: 0.0_f32,
13551        pitch_rate: 0.0_f32,
13552        yaw_rate: 0.0_f32,
13553        target_system: 0_u8,
13554        target_component: 0_u8,
13555        gimbal_device_id: 0_u8,
13556    };
13557    #[cfg(feature = "arbitrary")]
13558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13559        use arbitrary::{Arbitrary, Unstructured};
13560        let mut buf = [0u8; 1024];
13561        rng.fill_bytes(&mut buf);
13562        let mut unstructured = Unstructured::new(&buf);
13563        Self::arbitrary(&mut unstructured).unwrap_or_default()
13564    }
13565}
13566impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13567    fn default() -> Self {
13568        Self::DEFAULT.clone()
13569    }
13570}
13571impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13572    type Message = MavMessage;
13573    const ID: u32 = 288u32;
13574    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13575    const EXTRA_CRC: u8 = 20u8;
13576    const ENCODED_LEN: usize = 23usize;
13577    fn deser(
13578        _version: MavlinkVersion,
13579        __input: &[u8],
13580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13581        let avail_len = __input.len();
13582        let mut payload_buf = [0; Self::ENCODED_LEN];
13583        let mut buf = if avail_len < Self::ENCODED_LEN {
13584            payload_buf[0..avail_len].copy_from_slice(__input);
13585            Bytes::new(&payload_buf)
13586        } else {
13587            Bytes::new(__input)
13588        };
13589        let mut __struct = Self::default();
13590        let tmp = buf.get_u32_le();
13591        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13592            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13593                flag_type: "GimbalManagerFlags",
13594                value: tmp as u32,
13595            })?;
13596        __struct.pitch = buf.get_f32_le();
13597        __struct.yaw = buf.get_f32_le();
13598        __struct.pitch_rate = buf.get_f32_le();
13599        __struct.yaw_rate = buf.get_f32_le();
13600        __struct.target_system = buf.get_u8();
13601        __struct.target_component = buf.get_u8();
13602        __struct.gimbal_device_id = buf.get_u8();
13603        Ok(__struct)
13604    }
13605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13606        let mut __tmp = BytesMut::new(bytes);
13607        #[allow(clippy::absurd_extreme_comparisons)]
13608        #[allow(unused_comparisons)]
13609        if __tmp.remaining() < Self::ENCODED_LEN {
13610            panic!(
13611                "buffer is too small (need {} bytes, but got {})",
13612                Self::ENCODED_LEN,
13613                __tmp.remaining(),
13614            )
13615        }
13616        __tmp.put_u32_le(self.flags.bits());
13617        __tmp.put_f32_le(self.pitch);
13618        __tmp.put_f32_le(self.yaw);
13619        __tmp.put_f32_le(self.pitch_rate);
13620        __tmp.put_f32_le(self.yaw_rate);
13621        __tmp.put_u8(self.target_system);
13622        __tmp.put_u8(self.target_component);
13623        __tmp.put_u8(self.gimbal_device_id);
13624        if matches!(version, MavlinkVersion::V2) {
13625            let len = __tmp.len();
13626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13627        } else {
13628            __tmp.len()
13629        }
13630    }
13631}
13632#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13633#[doc = ""]
13634#[doc = "ID: 287"]
13635#[derive(Debug, Clone, PartialEq)]
13636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13638#[cfg_attr(feature = "ts", derive(TS))]
13639#[cfg_attr(feature = "ts", ts(export))]
13640pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13641    #[doc = "High level gimbal manager flags to use."]
13642    pub flags: GimbalManagerFlags,
13643    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13644    pub pitch: f32,
13645    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13646    pub yaw: f32,
13647    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13648    pub pitch_rate: f32,
13649    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13650    pub yaw_rate: f32,
13651    #[doc = "System ID"]
13652    pub target_system: u8,
13653    #[doc = "Component ID"]
13654    pub target_component: u8,
13655    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13656    pub gimbal_device_id: u8,
13657}
13658impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13659    pub const ENCODED_LEN: usize = 23usize;
13660    pub const DEFAULT: Self = Self {
13661        flags: GimbalManagerFlags::DEFAULT,
13662        pitch: 0.0_f32,
13663        yaw: 0.0_f32,
13664        pitch_rate: 0.0_f32,
13665        yaw_rate: 0.0_f32,
13666        target_system: 0_u8,
13667        target_component: 0_u8,
13668        gimbal_device_id: 0_u8,
13669    };
13670    #[cfg(feature = "arbitrary")]
13671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13672        use arbitrary::{Arbitrary, Unstructured};
13673        let mut buf = [0u8; 1024];
13674        rng.fill_bytes(&mut buf);
13675        let mut unstructured = Unstructured::new(&buf);
13676        Self::arbitrary(&mut unstructured).unwrap_or_default()
13677    }
13678}
13679impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13680    fn default() -> Self {
13681        Self::DEFAULT.clone()
13682    }
13683}
13684impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13685    type Message = MavMessage;
13686    const ID: u32 = 287u32;
13687    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13688    const EXTRA_CRC: u8 = 1u8;
13689    const ENCODED_LEN: usize = 23usize;
13690    fn deser(
13691        _version: MavlinkVersion,
13692        __input: &[u8],
13693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13694        let avail_len = __input.len();
13695        let mut payload_buf = [0; Self::ENCODED_LEN];
13696        let mut buf = if avail_len < Self::ENCODED_LEN {
13697            payload_buf[0..avail_len].copy_from_slice(__input);
13698            Bytes::new(&payload_buf)
13699        } else {
13700            Bytes::new(__input)
13701        };
13702        let mut __struct = Self::default();
13703        let tmp = buf.get_u32_le();
13704        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13705            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13706                flag_type: "GimbalManagerFlags",
13707                value: tmp as u32,
13708            })?;
13709        __struct.pitch = buf.get_f32_le();
13710        __struct.yaw = buf.get_f32_le();
13711        __struct.pitch_rate = buf.get_f32_le();
13712        __struct.yaw_rate = buf.get_f32_le();
13713        __struct.target_system = buf.get_u8();
13714        __struct.target_component = buf.get_u8();
13715        __struct.gimbal_device_id = buf.get_u8();
13716        Ok(__struct)
13717    }
13718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13719        let mut __tmp = BytesMut::new(bytes);
13720        #[allow(clippy::absurd_extreme_comparisons)]
13721        #[allow(unused_comparisons)]
13722        if __tmp.remaining() < Self::ENCODED_LEN {
13723            panic!(
13724                "buffer is too small (need {} bytes, but got {})",
13725                Self::ENCODED_LEN,
13726                __tmp.remaining(),
13727            )
13728        }
13729        __tmp.put_u32_le(self.flags.bits());
13730        __tmp.put_f32_le(self.pitch);
13731        __tmp.put_f32_le(self.yaw);
13732        __tmp.put_f32_le(self.pitch_rate);
13733        __tmp.put_f32_le(self.yaw_rate);
13734        __tmp.put_u8(self.target_system);
13735        __tmp.put_u8(self.target_component);
13736        __tmp.put_u8(self.gimbal_device_id);
13737        if matches!(version, MavlinkVersion::V2) {
13738            let len = __tmp.len();
13739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13740        } else {
13741            __tmp.len()
13742        }
13743    }
13744}
13745#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13746#[doc = ""]
13747#[doc = "ID: 281"]
13748#[derive(Debug, Clone, PartialEq)]
13749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13751#[cfg_attr(feature = "ts", derive(TS))]
13752#[cfg_attr(feature = "ts", ts(export))]
13753pub struct GIMBAL_MANAGER_STATUS_DATA {
13754    #[doc = "Timestamp (time since system boot)."]
13755    pub time_boot_ms: u32,
13756    #[doc = "High level gimbal manager flags currently applied."]
13757    pub flags: GimbalManagerFlags,
13758    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13759    pub gimbal_device_id: u8,
13760    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13761    pub primary_control_sysid: u8,
13762    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13763    pub primary_control_compid: u8,
13764    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13765    pub secondary_control_sysid: u8,
13766    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13767    pub secondary_control_compid: u8,
13768}
13769impl GIMBAL_MANAGER_STATUS_DATA {
13770    pub const ENCODED_LEN: usize = 13usize;
13771    pub const DEFAULT: Self = Self {
13772        time_boot_ms: 0_u32,
13773        flags: GimbalManagerFlags::DEFAULT,
13774        gimbal_device_id: 0_u8,
13775        primary_control_sysid: 0_u8,
13776        primary_control_compid: 0_u8,
13777        secondary_control_sysid: 0_u8,
13778        secondary_control_compid: 0_u8,
13779    };
13780    #[cfg(feature = "arbitrary")]
13781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13782        use arbitrary::{Arbitrary, Unstructured};
13783        let mut buf = [0u8; 1024];
13784        rng.fill_bytes(&mut buf);
13785        let mut unstructured = Unstructured::new(&buf);
13786        Self::arbitrary(&mut unstructured).unwrap_or_default()
13787    }
13788}
13789impl Default for GIMBAL_MANAGER_STATUS_DATA {
13790    fn default() -> Self {
13791        Self::DEFAULT.clone()
13792    }
13793}
13794impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13795    type Message = MavMessage;
13796    const ID: u32 = 281u32;
13797    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13798    const EXTRA_CRC: u8 = 48u8;
13799    const ENCODED_LEN: usize = 13usize;
13800    fn deser(
13801        _version: MavlinkVersion,
13802        __input: &[u8],
13803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13804        let avail_len = __input.len();
13805        let mut payload_buf = [0; Self::ENCODED_LEN];
13806        let mut buf = if avail_len < Self::ENCODED_LEN {
13807            payload_buf[0..avail_len].copy_from_slice(__input);
13808            Bytes::new(&payload_buf)
13809        } else {
13810            Bytes::new(__input)
13811        };
13812        let mut __struct = Self::default();
13813        __struct.time_boot_ms = buf.get_u32_le();
13814        let tmp = buf.get_u32_le();
13815        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13816            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13817                flag_type: "GimbalManagerFlags",
13818                value: tmp as u32,
13819            })?;
13820        __struct.gimbal_device_id = buf.get_u8();
13821        __struct.primary_control_sysid = buf.get_u8();
13822        __struct.primary_control_compid = buf.get_u8();
13823        __struct.secondary_control_sysid = buf.get_u8();
13824        __struct.secondary_control_compid = buf.get_u8();
13825        Ok(__struct)
13826    }
13827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13828        let mut __tmp = BytesMut::new(bytes);
13829        #[allow(clippy::absurd_extreme_comparisons)]
13830        #[allow(unused_comparisons)]
13831        if __tmp.remaining() < Self::ENCODED_LEN {
13832            panic!(
13833                "buffer is too small (need {} bytes, but got {})",
13834                Self::ENCODED_LEN,
13835                __tmp.remaining(),
13836            )
13837        }
13838        __tmp.put_u32_le(self.time_boot_ms);
13839        __tmp.put_u32_le(self.flags.bits());
13840        __tmp.put_u8(self.gimbal_device_id);
13841        __tmp.put_u8(self.primary_control_sysid);
13842        __tmp.put_u8(self.primary_control_compid);
13843        __tmp.put_u8(self.secondary_control_sysid);
13844        __tmp.put_u8(self.secondary_control_compid);
13845        if matches!(version, MavlinkVersion::V2) {
13846            let len = __tmp.len();
13847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13848        } else {
13849            __tmp.len()
13850        }
13851    }
13852}
13853#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13854#[doc = ""]
13855#[doc = "ID: 33"]
13856#[derive(Debug, Clone, PartialEq)]
13857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13859#[cfg_attr(feature = "ts", derive(TS))]
13860#[cfg_attr(feature = "ts", ts(export))]
13861pub struct GLOBAL_POSITION_INT_DATA {
13862    #[doc = "Timestamp (time since system boot)."]
13863    pub time_boot_ms: u32,
13864    #[doc = "Latitude, expressed"]
13865    pub lat: i32,
13866    #[doc = "Longitude, expressed"]
13867    pub lon: i32,
13868    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13869    pub alt: i32,
13870    #[doc = "Altitude above home"]
13871    pub relative_alt: i32,
13872    #[doc = "Ground X Speed (Latitude, positive north)"]
13873    pub vx: i16,
13874    #[doc = "Ground Y Speed (Longitude, positive east)"]
13875    pub vy: i16,
13876    #[doc = "Ground Z Speed (Altitude, positive down)"]
13877    pub vz: i16,
13878    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13879    pub hdg: u16,
13880}
13881impl GLOBAL_POSITION_INT_DATA {
13882    pub const ENCODED_LEN: usize = 28usize;
13883    pub const DEFAULT: Self = Self {
13884        time_boot_ms: 0_u32,
13885        lat: 0_i32,
13886        lon: 0_i32,
13887        alt: 0_i32,
13888        relative_alt: 0_i32,
13889        vx: 0_i16,
13890        vy: 0_i16,
13891        vz: 0_i16,
13892        hdg: 0_u16,
13893    };
13894    #[cfg(feature = "arbitrary")]
13895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13896        use arbitrary::{Arbitrary, Unstructured};
13897        let mut buf = [0u8; 1024];
13898        rng.fill_bytes(&mut buf);
13899        let mut unstructured = Unstructured::new(&buf);
13900        Self::arbitrary(&mut unstructured).unwrap_or_default()
13901    }
13902}
13903impl Default for GLOBAL_POSITION_INT_DATA {
13904    fn default() -> Self {
13905        Self::DEFAULT.clone()
13906    }
13907}
13908impl MessageData for GLOBAL_POSITION_INT_DATA {
13909    type Message = MavMessage;
13910    const ID: u32 = 33u32;
13911    const NAME: &'static str = "GLOBAL_POSITION_INT";
13912    const EXTRA_CRC: u8 = 104u8;
13913    const ENCODED_LEN: usize = 28usize;
13914    fn deser(
13915        _version: MavlinkVersion,
13916        __input: &[u8],
13917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13918        let avail_len = __input.len();
13919        let mut payload_buf = [0; Self::ENCODED_LEN];
13920        let mut buf = if avail_len < Self::ENCODED_LEN {
13921            payload_buf[0..avail_len].copy_from_slice(__input);
13922            Bytes::new(&payload_buf)
13923        } else {
13924            Bytes::new(__input)
13925        };
13926        let mut __struct = Self::default();
13927        __struct.time_boot_ms = buf.get_u32_le();
13928        __struct.lat = buf.get_i32_le();
13929        __struct.lon = buf.get_i32_le();
13930        __struct.alt = buf.get_i32_le();
13931        __struct.relative_alt = buf.get_i32_le();
13932        __struct.vx = buf.get_i16_le();
13933        __struct.vy = buf.get_i16_le();
13934        __struct.vz = buf.get_i16_le();
13935        __struct.hdg = buf.get_u16_le();
13936        Ok(__struct)
13937    }
13938    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13939        let mut __tmp = BytesMut::new(bytes);
13940        #[allow(clippy::absurd_extreme_comparisons)]
13941        #[allow(unused_comparisons)]
13942        if __tmp.remaining() < Self::ENCODED_LEN {
13943            panic!(
13944                "buffer is too small (need {} bytes, but got {})",
13945                Self::ENCODED_LEN,
13946                __tmp.remaining(),
13947            )
13948        }
13949        __tmp.put_u32_le(self.time_boot_ms);
13950        __tmp.put_i32_le(self.lat);
13951        __tmp.put_i32_le(self.lon);
13952        __tmp.put_i32_le(self.alt);
13953        __tmp.put_i32_le(self.relative_alt);
13954        __tmp.put_i16_le(self.vx);
13955        __tmp.put_i16_le(self.vy);
13956        __tmp.put_i16_le(self.vz);
13957        __tmp.put_u16_le(self.hdg);
13958        if matches!(version, MavlinkVersion::V2) {
13959            let len = __tmp.len();
13960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13961        } else {
13962            __tmp.len()
13963        }
13964    }
13965}
13966#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13967#[doc = ""]
13968#[doc = "ID: 63"]
13969#[derive(Debug, Clone, PartialEq)]
13970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13972#[cfg_attr(feature = "ts", derive(TS))]
13973#[cfg_attr(feature = "ts", ts(export))]
13974pub struct GLOBAL_POSITION_INT_COV_DATA {
13975    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13976    pub time_usec: u64,
13977    #[doc = "Latitude"]
13978    pub lat: i32,
13979    #[doc = "Longitude"]
13980    pub lon: i32,
13981    #[doc = "Altitude in meters above MSL"]
13982    pub alt: i32,
13983    #[doc = "Altitude above ground"]
13984    pub relative_alt: i32,
13985    #[doc = "Ground X Speed (Latitude)"]
13986    pub vx: f32,
13987    #[doc = "Ground Y Speed (Longitude)"]
13988    pub vy: f32,
13989    #[doc = "Ground Z Speed (Altitude)"]
13990    pub vz: f32,
13991    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13994    pub covariance: [f32; 36],
13995    #[doc = "Class id of the estimator this estimate originated from."]
13996    pub estimator_type: MavEstimatorType,
13997}
13998impl GLOBAL_POSITION_INT_COV_DATA {
13999    pub const ENCODED_LEN: usize = 181usize;
14000    pub const DEFAULT: Self = Self {
14001        time_usec: 0_u64,
14002        lat: 0_i32,
14003        lon: 0_i32,
14004        alt: 0_i32,
14005        relative_alt: 0_i32,
14006        vx: 0.0_f32,
14007        vy: 0.0_f32,
14008        vz: 0.0_f32,
14009        covariance: [0.0_f32; 36usize],
14010        estimator_type: MavEstimatorType::DEFAULT,
14011    };
14012    #[cfg(feature = "arbitrary")]
14013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14014        use arbitrary::{Arbitrary, Unstructured};
14015        let mut buf = [0u8; 1024];
14016        rng.fill_bytes(&mut buf);
14017        let mut unstructured = Unstructured::new(&buf);
14018        Self::arbitrary(&mut unstructured).unwrap_or_default()
14019    }
14020}
14021impl Default for GLOBAL_POSITION_INT_COV_DATA {
14022    fn default() -> Self {
14023        Self::DEFAULT.clone()
14024    }
14025}
14026impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14027    type Message = MavMessage;
14028    const ID: u32 = 63u32;
14029    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14030    const EXTRA_CRC: u8 = 119u8;
14031    const ENCODED_LEN: usize = 181usize;
14032    fn deser(
14033        _version: MavlinkVersion,
14034        __input: &[u8],
14035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14036        let avail_len = __input.len();
14037        let mut payload_buf = [0; Self::ENCODED_LEN];
14038        let mut buf = if avail_len < Self::ENCODED_LEN {
14039            payload_buf[0..avail_len].copy_from_slice(__input);
14040            Bytes::new(&payload_buf)
14041        } else {
14042            Bytes::new(__input)
14043        };
14044        let mut __struct = Self::default();
14045        __struct.time_usec = buf.get_u64_le();
14046        __struct.lat = buf.get_i32_le();
14047        __struct.lon = buf.get_i32_le();
14048        __struct.alt = buf.get_i32_le();
14049        __struct.relative_alt = buf.get_i32_le();
14050        __struct.vx = buf.get_f32_le();
14051        __struct.vy = buf.get_f32_le();
14052        __struct.vz = buf.get_f32_le();
14053        for v in &mut __struct.covariance {
14054            let val = buf.get_f32_le();
14055            *v = val;
14056        }
14057        let tmp = buf.get_u8();
14058        __struct.estimator_type =
14059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14060                enum_type: "MavEstimatorType",
14061                value: tmp as u32,
14062            })?;
14063        Ok(__struct)
14064    }
14065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14066        let mut __tmp = BytesMut::new(bytes);
14067        #[allow(clippy::absurd_extreme_comparisons)]
14068        #[allow(unused_comparisons)]
14069        if __tmp.remaining() < Self::ENCODED_LEN {
14070            panic!(
14071                "buffer is too small (need {} bytes, but got {})",
14072                Self::ENCODED_LEN,
14073                __tmp.remaining(),
14074            )
14075        }
14076        __tmp.put_u64_le(self.time_usec);
14077        __tmp.put_i32_le(self.lat);
14078        __tmp.put_i32_le(self.lon);
14079        __tmp.put_i32_le(self.alt);
14080        __tmp.put_i32_le(self.relative_alt);
14081        __tmp.put_f32_le(self.vx);
14082        __tmp.put_f32_le(self.vy);
14083        __tmp.put_f32_le(self.vz);
14084        for val in &self.covariance {
14085            __tmp.put_f32_le(*val);
14086        }
14087        __tmp.put_u8(self.estimator_type as u8);
14088        if matches!(version, MavlinkVersion::V2) {
14089            let len = __tmp.len();
14090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14091        } else {
14092            __tmp.len()
14093        }
14094    }
14095}
14096#[doc = "Global position/attitude estimate from a vision source."]
14097#[doc = ""]
14098#[doc = "ID: 101"]
14099#[derive(Debug, Clone, PartialEq)]
14100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14102#[cfg_attr(feature = "ts", derive(TS))]
14103#[cfg_attr(feature = "ts", ts(export))]
14104pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14105    #[doc = "Timestamp (UNIX time or since system boot)"]
14106    pub usec: u64,
14107    #[doc = "Global X position"]
14108    pub x: f32,
14109    #[doc = "Global Y position"]
14110    pub y: f32,
14111    #[doc = "Global Z position"]
14112    pub z: f32,
14113    #[doc = "Roll angle"]
14114    pub roll: f32,
14115    #[doc = "Pitch angle"]
14116    pub pitch: f32,
14117    #[doc = "Yaw angle"]
14118    pub yaw: f32,
14119    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14120    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14122    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14123    pub covariance: [f32; 21],
14124    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14126    pub reset_counter: u8,
14127}
14128impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14129    pub const ENCODED_LEN: usize = 117usize;
14130    pub const DEFAULT: Self = Self {
14131        usec: 0_u64,
14132        x: 0.0_f32,
14133        y: 0.0_f32,
14134        z: 0.0_f32,
14135        roll: 0.0_f32,
14136        pitch: 0.0_f32,
14137        yaw: 0.0_f32,
14138        covariance: [0.0_f32; 21usize],
14139        reset_counter: 0_u8,
14140    };
14141    #[cfg(feature = "arbitrary")]
14142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14143        use arbitrary::{Arbitrary, Unstructured};
14144        let mut buf = [0u8; 1024];
14145        rng.fill_bytes(&mut buf);
14146        let mut unstructured = Unstructured::new(&buf);
14147        Self::arbitrary(&mut unstructured).unwrap_or_default()
14148    }
14149}
14150impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14151    fn default() -> Self {
14152        Self::DEFAULT.clone()
14153    }
14154}
14155impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14156    type Message = MavMessage;
14157    const ID: u32 = 101u32;
14158    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14159    const EXTRA_CRC: u8 = 102u8;
14160    const ENCODED_LEN: usize = 117usize;
14161    fn deser(
14162        _version: MavlinkVersion,
14163        __input: &[u8],
14164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14165        let avail_len = __input.len();
14166        let mut payload_buf = [0; Self::ENCODED_LEN];
14167        let mut buf = if avail_len < Self::ENCODED_LEN {
14168            payload_buf[0..avail_len].copy_from_slice(__input);
14169            Bytes::new(&payload_buf)
14170        } else {
14171            Bytes::new(__input)
14172        };
14173        let mut __struct = Self::default();
14174        __struct.usec = buf.get_u64_le();
14175        __struct.x = buf.get_f32_le();
14176        __struct.y = buf.get_f32_le();
14177        __struct.z = buf.get_f32_le();
14178        __struct.roll = buf.get_f32_le();
14179        __struct.pitch = buf.get_f32_le();
14180        __struct.yaw = buf.get_f32_le();
14181        for v in &mut __struct.covariance {
14182            let val = buf.get_f32_le();
14183            *v = val;
14184        }
14185        __struct.reset_counter = buf.get_u8();
14186        Ok(__struct)
14187    }
14188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14189        let mut __tmp = BytesMut::new(bytes);
14190        #[allow(clippy::absurd_extreme_comparisons)]
14191        #[allow(unused_comparisons)]
14192        if __tmp.remaining() < Self::ENCODED_LEN {
14193            panic!(
14194                "buffer is too small (need {} bytes, but got {})",
14195                Self::ENCODED_LEN,
14196                __tmp.remaining(),
14197            )
14198        }
14199        __tmp.put_u64_le(self.usec);
14200        __tmp.put_f32_le(self.x);
14201        __tmp.put_f32_le(self.y);
14202        __tmp.put_f32_le(self.z);
14203        __tmp.put_f32_le(self.roll);
14204        __tmp.put_f32_le(self.pitch);
14205        __tmp.put_f32_le(self.yaw);
14206        if matches!(version, MavlinkVersion::V2) {
14207            for val in &self.covariance {
14208                __tmp.put_f32_le(*val);
14209            }
14210            __tmp.put_u8(self.reset_counter);
14211            let len = __tmp.len();
14212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14213        } else {
14214            __tmp.len()
14215        }
14216    }
14217}
14218#[doc = "Information about key components of GNSS receivers, like signal authentication, interference and system errors."]
14219#[doc = ""]
14220#[doc = "ID: 441"]
14221#[derive(Debug, Clone, PartialEq)]
14222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14224#[cfg_attr(feature = "ts", derive(TS))]
14225#[cfg_attr(feature = "ts", ts(export))]
14226pub struct GNSS_INTEGRITY_DATA {
14227    #[doc = "Errors in the GPS system."]
14228    pub system_errors: GpsSystemErrorFlags,
14229    #[doc = "Horizontal expected accuracy using satellites successfully validated using RAIM."]
14230    pub raim_hfom: u16,
14231    #[doc = "Vertical expected accuracy using satellites successfully validated using RAIM."]
14232    pub raim_vfom: u16,
14233    #[doc = "GNSS receiver id. Must match instance ids of other messages from same receiver."]
14234    pub id: u8,
14235    #[doc = "Signal authentication state of the GPS system."]
14236    pub authentication_state: GpsAuthenticationState,
14237    #[doc = "Signal jamming state of the GPS system."]
14238    pub jamming_state: GpsJammingState,
14239    #[doc = "Signal spoofing state of the GPS system."]
14240    pub spoofing_state: GpsSpoofingState,
14241    #[doc = "The state of the RAIM processing."]
14242    pub raim_state: GpsRaimState,
14243    #[doc = "An abstract value representing the estimated quality of incoming corrections, or 255 if not available."]
14244    pub corrections_quality: u8,
14245    #[doc = "An abstract value representing the overall status of the receiver, or 255 if not available."]
14246    pub system_status_summary: u8,
14247    #[doc = "An abstract value representing the quality of incoming GNSS signals, or 255 if not available."]
14248    pub gnss_signal_quality: u8,
14249    #[doc = "An abstract value representing the estimated PPK quality, or 255 if not available."]
14250    pub post_processing_quality: u8,
14251}
14252impl GNSS_INTEGRITY_DATA {
14253    pub const ENCODED_LEN: usize = 17usize;
14254    pub const DEFAULT: Self = Self {
14255        system_errors: GpsSystemErrorFlags::DEFAULT,
14256        raim_hfom: 0_u16,
14257        raim_vfom: 0_u16,
14258        id: 0_u8,
14259        authentication_state: GpsAuthenticationState::DEFAULT,
14260        jamming_state: GpsJammingState::DEFAULT,
14261        spoofing_state: GpsSpoofingState::DEFAULT,
14262        raim_state: GpsRaimState::DEFAULT,
14263        corrections_quality: 0_u8,
14264        system_status_summary: 0_u8,
14265        gnss_signal_quality: 0_u8,
14266        post_processing_quality: 0_u8,
14267    };
14268    #[cfg(feature = "arbitrary")]
14269    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14270        use arbitrary::{Arbitrary, Unstructured};
14271        let mut buf = [0u8; 1024];
14272        rng.fill_bytes(&mut buf);
14273        let mut unstructured = Unstructured::new(&buf);
14274        Self::arbitrary(&mut unstructured).unwrap_or_default()
14275    }
14276}
14277impl Default for GNSS_INTEGRITY_DATA {
14278    fn default() -> Self {
14279        Self::DEFAULT.clone()
14280    }
14281}
14282impl MessageData for GNSS_INTEGRITY_DATA {
14283    type Message = MavMessage;
14284    const ID: u32 = 441u32;
14285    const NAME: &'static str = "GNSS_INTEGRITY";
14286    const EXTRA_CRC: u8 = 169u8;
14287    const ENCODED_LEN: usize = 17usize;
14288    fn deser(
14289        _version: MavlinkVersion,
14290        __input: &[u8],
14291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14292        let avail_len = __input.len();
14293        let mut payload_buf = [0; Self::ENCODED_LEN];
14294        let mut buf = if avail_len < Self::ENCODED_LEN {
14295            payload_buf[0..avail_len].copy_from_slice(__input);
14296            Bytes::new(&payload_buf)
14297        } else {
14298            Bytes::new(__input)
14299        };
14300        let mut __struct = Self::default();
14301        let tmp = buf.get_u32_le();
14302        __struct.system_errors = GpsSystemErrorFlags::from_bits(
14303            tmp & GpsSystemErrorFlags::all().bits(),
14304        )
14305        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14306            flag_type: "GpsSystemErrorFlags",
14307            value: tmp as u32,
14308        })?;
14309        __struct.raim_hfom = buf.get_u16_le();
14310        __struct.raim_vfom = buf.get_u16_le();
14311        __struct.id = buf.get_u8();
14312        let tmp = buf.get_u8();
14313        __struct.authentication_state =
14314            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14315                enum_type: "GpsAuthenticationState",
14316                value: tmp as u32,
14317            })?;
14318        let tmp = buf.get_u8();
14319        __struct.jamming_state =
14320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14321                enum_type: "GpsJammingState",
14322                value: tmp as u32,
14323            })?;
14324        let tmp = buf.get_u8();
14325        __struct.spoofing_state =
14326            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14327                enum_type: "GpsSpoofingState",
14328                value: tmp as u32,
14329            })?;
14330        let tmp = buf.get_u8();
14331        __struct.raim_state =
14332            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14333                enum_type: "GpsRaimState",
14334                value: tmp as u32,
14335            })?;
14336        __struct.corrections_quality = buf.get_u8();
14337        __struct.system_status_summary = buf.get_u8();
14338        __struct.gnss_signal_quality = buf.get_u8();
14339        __struct.post_processing_quality = buf.get_u8();
14340        Ok(__struct)
14341    }
14342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14343        let mut __tmp = BytesMut::new(bytes);
14344        #[allow(clippy::absurd_extreme_comparisons)]
14345        #[allow(unused_comparisons)]
14346        if __tmp.remaining() < Self::ENCODED_LEN {
14347            panic!(
14348                "buffer is too small (need {} bytes, but got {})",
14349                Self::ENCODED_LEN,
14350                __tmp.remaining(),
14351            )
14352        }
14353        __tmp.put_u32_le(self.system_errors.bits());
14354        __tmp.put_u16_le(self.raim_hfom);
14355        __tmp.put_u16_le(self.raim_vfom);
14356        __tmp.put_u8(self.id);
14357        __tmp.put_u8(self.authentication_state as u8);
14358        __tmp.put_u8(self.jamming_state as u8);
14359        __tmp.put_u8(self.spoofing_state as u8);
14360        __tmp.put_u8(self.raim_state as u8);
14361        __tmp.put_u8(self.corrections_quality);
14362        __tmp.put_u8(self.system_status_summary);
14363        __tmp.put_u8(self.gnss_signal_quality);
14364        __tmp.put_u8(self.post_processing_quality);
14365        if matches!(version, MavlinkVersion::V2) {
14366            let len = __tmp.len();
14367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14368        } else {
14369            __tmp.len()
14370        }
14371    }
14372}
14373#[doc = "Second GPS data."]
14374#[doc = ""]
14375#[doc = "ID: 124"]
14376#[derive(Debug, Clone, PartialEq)]
14377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14379#[cfg_attr(feature = "ts", derive(TS))]
14380#[cfg_attr(feature = "ts", ts(export))]
14381pub struct GPS2_RAW_DATA {
14382    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14383    pub time_usec: u64,
14384    #[doc = "Latitude (WGS84)"]
14385    pub lat: i32,
14386    #[doc = "Longitude (WGS84)"]
14387    pub lon: i32,
14388    #[doc = "Altitude (MSL). Positive for up."]
14389    pub alt: i32,
14390    #[doc = "Age of DGPS info"]
14391    pub dgps_age: u32,
14392    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14393    pub eph: u16,
14394    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14395    pub epv: u16,
14396    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14397    pub vel: u16,
14398    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14399    pub cog: u16,
14400    #[doc = "GPS fix type."]
14401    pub fix_type: GpsFixType,
14402    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14403    pub satellites_visible: u8,
14404    #[doc = "Number of DGPS satellites"]
14405    pub dgps_numch: u8,
14406    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14407    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14408    pub yaw: u16,
14409    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14410    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14411    pub alt_ellipsoid: i32,
14412    #[doc = "Position uncertainty."]
14413    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14414    pub h_acc: u32,
14415    #[doc = "Altitude uncertainty."]
14416    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14417    pub v_acc: u32,
14418    #[doc = "Speed uncertainty."]
14419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14420    pub vel_acc: u32,
14421    #[doc = "Heading / track uncertainty"]
14422    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14423    pub hdg_acc: u32,
14424}
14425impl GPS2_RAW_DATA {
14426    pub const ENCODED_LEN: usize = 57usize;
14427    pub const DEFAULT: Self = Self {
14428        time_usec: 0_u64,
14429        lat: 0_i32,
14430        lon: 0_i32,
14431        alt: 0_i32,
14432        dgps_age: 0_u32,
14433        eph: 0_u16,
14434        epv: 0_u16,
14435        vel: 0_u16,
14436        cog: 0_u16,
14437        fix_type: GpsFixType::DEFAULT,
14438        satellites_visible: 0_u8,
14439        dgps_numch: 0_u8,
14440        yaw: 0_u16,
14441        alt_ellipsoid: 0_i32,
14442        h_acc: 0_u32,
14443        v_acc: 0_u32,
14444        vel_acc: 0_u32,
14445        hdg_acc: 0_u32,
14446    };
14447    #[cfg(feature = "arbitrary")]
14448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14449        use arbitrary::{Arbitrary, Unstructured};
14450        let mut buf = [0u8; 1024];
14451        rng.fill_bytes(&mut buf);
14452        let mut unstructured = Unstructured::new(&buf);
14453        Self::arbitrary(&mut unstructured).unwrap_or_default()
14454    }
14455}
14456impl Default for GPS2_RAW_DATA {
14457    fn default() -> Self {
14458        Self::DEFAULT.clone()
14459    }
14460}
14461impl MessageData for GPS2_RAW_DATA {
14462    type Message = MavMessage;
14463    const ID: u32 = 124u32;
14464    const NAME: &'static str = "GPS2_RAW";
14465    const EXTRA_CRC: u8 = 87u8;
14466    const ENCODED_LEN: usize = 57usize;
14467    fn deser(
14468        _version: MavlinkVersion,
14469        __input: &[u8],
14470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14471        let avail_len = __input.len();
14472        let mut payload_buf = [0; Self::ENCODED_LEN];
14473        let mut buf = if avail_len < Self::ENCODED_LEN {
14474            payload_buf[0..avail_len].copy_from_slice(__input);
14475            Bytes::new(&payload_buf)
14476        } else {
14477            Bytes::new(__input)
14478        };
14479        let mut __struct = Self::default();
14480        __struct.time_usec = buf.get_u64_le();
14481        __struct.lat = buf.get_i32_le();
14482        __struct.lon = buf.get_i32_le();
14483        __struct.alt = buf.get_i32_le();
14484        __struct.dgps_age = buf.get_u32_le();
14485        __struct.eph = buf.get_u16_le();
14486        __struct.epv = buf.get_u16_le();
14487        __struct.vel = buf.get_u16_le();
14488        __struct.cog = buf.get_u16_le();
14489        let tmp = buf.get_u8();
14490        __struct.fix_type =
14491            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14492                enum_type: "GpsFixType",
14493                value: tmp as u32,
14494            })?;
14495        __struct.satellites_visible = buf.get_u8();
14496        __struct.dgps_numch = buf.get_u8();
14497        __struct.yaw = buf.get_u16_le();
14498        __struct.alt_ellipsoid = buf.get_i32_le();
14499        __struct.h_acc = buf.get_u32_le();
14500        __struct.v_acc = buf.get_u32_le();
14501        __struct.vel_acc = buf.get_u32_le();
14502        __struct.hdg_acc = buf.get_u32_le();
14503        Ok(__struct)
14504    }
14505    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14506        let mut __tmp = BytesMut::new(bytes);
14507        #[allow(clippy::absurd_extreme_comparisons)]
14508        #[allow(unused_comparisons)]
14509        if __tmp.remaining() < Self::ENCODED_LEN {
14510            panic!(
14511                "buffer is too small (need {} bytes, but got {})",
14512                Self::ENCODED_LEN,
14513                __tmp.remaining(),
14514            )
14515        }
14516        __tmp.put_u64_le(self.time_usec);
14517        __tmp.put_i32_le(self.lat);
14518        __tmp.put_i32_le(self.lon);
14519        __tmp.put_i32_le(self.alt);
14520        __tmp.put_u32_le(self.dgps_age);
14521        __tmp.put_u16_le(self.eph);
14522        __tmp.put_u16_le(self.epv);
14523        __tmp.put_u16_le(self.vel);
14524        __tmp.put_u16_le(self.cog);
14525        __tmp.put_u8(self.fix_type as u8);
14526        __tmp.put_u8(self.satellites_visible);
14527        __tmp.put_u8(self.dgps_numch);
14528        if matches!(version, MavlinkVersion::V2) {
14529            __tmp.put_u16_le(self.yaw);
14530            __tmp.put_i32_le(self.alt_ellipsoid);
14531            __tmp.put_u32_le(self.h_acc);
14532            __tmp.put_u32_le(self.v_acc);
14533            __tmp.put_u32_le(self.vel_acc);
14534            __tmp.put_u32_le(self.hdg_acc);
14535            let len = __tmp.len();
14536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14537        } else {
14538            __tmp.len()
14539        }
14540    }
14541}
14542#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14543#[doc = ""]
14544#[doc = "ID: 128"]
14545#[derive(Debug, Clone, PartialEq)]
14546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14548#[cfg_attr(feature = "ts", derive(TS))]
14549#[cfg_attr(feature = "ts", ts(export))]
14550pub struct GPS2_RTK_DATA {
14551    #[doc = "Time since boot of last baseline message received."]
14552    pub time_last_baseline_ms: u32,
14553    #[doc = "GPS Time of Week of last baseline"]
14554    pub tow: u32,
14555    #[doc = "Current baseline in ECEF x or NED north component."]
14556    pub baseline_a_mm: i32,
14557    #[doc = "Current baseline in ECEF y or NED east component."]
14558    pub baseline_b_mm: i32,
14559    #[doc = "Current baseline in ECEF z or NED down component."]
14560    pub baseline_c_mm: i32,
14561    #[doc = "Current estimate of baseline accuracy."]
14562    pub accuracy: u32,
14563    #[doc = "Current number of integer ambiguity hypotheses."]
14564    pub iar_num_hypotheses: i32,
14565    #[doc = "GPS Week Number of last baseline"]
14566    pub wn: u16,
14567    #[doc = "Identification of connected RTK receiver."]
14568    pub rtk_receiver_id: u8,
14569    #[doc = "GPS-specific health report for RTK data."]
14570    pub rtk_health: u8,
14571    #[doc = "Rate of baseline messages being received by GPS"]
14572    pub rtk_rate: u8,
14573    #[doc = "Current number of sats used for RTK calculation."]
14574    pub nsats: u8,
14575    #[doc = "Coordinate system of baseline"]
14576    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14577}
14578impl GPS2_RTK_DATA {
14579    pub const ENCODED_LEN: usize = 35usize;
14580    pub const DEFAULT: Self = Self {
14581        time_last_baseline_ms: 0_u32,
14582        tow: 0_u32,
14583        baseline_a_mm: 0_i32,
14584        baseline_b_mm: 0_i32,
14585        baseline_c_mm: 0_i32,
14586        accuracy: 0_u32,
14587        iar_num_hypotheses: 0_i32,
14588        wn: 0_u16,
14589        rtk_receiver_id: 0_u8,
14590        rtk_health: 0_u8,
14591        rtk_rate: 0_u8,
14592        nsats: 0_u8,
14593        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14594    };
14595    #[cfg(feature = "arbitrary")]
14596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14597        use arbitrary::{Arbitrary, Unstructured};
14598        let mut buf = [0u8; 1024];
14599        rng.fill_bytes(&mut buf);
14600        let mut unstructured = Unstructured::new(&buf);
14601        Self::arbitrary(&mut unstructured).unwrap_or_default()
14602    }
14603}
14604impl Default for GPS2_RTK_DATA {
14605    fn default() -> Self {
14606        Self::DEFAULT.clone()
14607    }
14608}
14609impl MessageData for GPS2_RTK_DATA {
14610    type Message = MavMessage;
14611    const ID: u32 = 128u32;
14612    const NAME: &'static str = "GPS2_RTK";
14613    const EXTRA_CRC: u8 = 226u8;
14614    const ENCODED_LEN: usize = 35usize;
14615    fn deser(
14616        _version: MavlinkVersion,
14617        __input: &[u8],
14618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14619        let avail_len = __input.len();
14620        let mut payload_buf = [0; Self::ENCODED_LEN];
14621        let mut buf = if avail_len < Self::ENCODED_LEN {
14622            payload_buf[0..avail_len].copy_from_slice(__input);
14623            Bytes::new(&payload_buf)
14624        } else {
14625            Bytes::new(__input)
14626        };
14627        let mut __struct = Self::default();
14628        __struct.time_last_baseline_ms = buf.get_u32_le();
14629        __struct.tow = buf.get_u32_le();
14630        __struct.baseline_a_mm = buf.get_i32_le();
14631        __struct.baseline_b_mm = buf.get_i32_le();
14632        __struct.baseline_c_mm = buf.get_i32_le();
14633        __struct.accuracy = buf.get_u32_le();
14634        __struct.iar_num_hypotheses = buf.get_i32_le();
14635        __struct.wn = buf.get_u16_le();
14636        __struct.rtk_receiver_id = buf.get_u8();
14637        __struct.rtk_health = buf.get_u8();
14638        __struct.rtk_rate = buf.get_u8();
14639        __struct.nsats = buf.get_u8();
14640        let tmp = buf.get_u8();
14641        __struct.baseline_coords_type =
14642            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14643                enum_type: "RtkBaselineCoordinateSystem",
14644                value: tmp as u32,
14645            })?;
14646        Ok(__struct)
14647    }
14648    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14649        let mut __tmp = BytesMut::new(bytes);
14650        #[allow(clippy::absurd_extreme_comparisons)]
14651        #[allow(unused_comparisons)]
14652        if __tmp.remaining() < Self::ENCODED_LEN {
14653            panic!(
14654                "buffer is too small (need {} bytes, but got {})",
14655                Self::ENCODED_LEN,
14656                __tmp.remaining(),
14657            )
14658        }
14659        __tmp.put_u32_le(self.time_last_baseline_ms);
14660        __tmp.put_u32_le(self.tow);
14661        __tmp.put_i32_le(self.baseline_a_mm);
14662        __tmp.put_i32_le(self.baseline_b_mm);
14663        __tmp.put_i32_le(self.baseline_c_mm);
14664        __tmp.put_u32_le(self.accuracy);
14665        __tmp.put_i32_le(self.iar_num_hypotheses);
14666        __tmp.put_u16_le(self.wn);
14667        __tmp.put_u8(self.rtk_receiver_id);
14668        __tmp.put_u8(self.rtk_health);
14669        __tmp.put_u8(self.rtk_rate);
14670        __tmp.put_u8(self.nsats);
14671        __tmp.put_u8(self.baseline_coords_type as u8);
14672        if matches!(version, MavlinkVersion::V2) {
14673            let len = __tmp.len();
14674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14675        } else {
14676            __tmp.len()
14677        }
14678    }
14679}
14680#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14681#[doc = ""]
14682#[doc = "ID: 49"]
14683#[derive(Debug, Clone, PartialEq)]
14684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14686#[cfg_attr(feature = "ts", derive(TS))]
14687#[cfg_attr(feature = "ts", ts(export))]
14688pub struct GPS_GLOBAL_ORIGIN_DATA {
14689    #[doc = "Latitude (WGS84)"]
14690    pub latitude: i32,
14691    #[doc = "Longitude (WGS84)"]
14692    pub longitude: i32,
14693    #[doc = "Altitude (MSL). Positive for up."]
14694    pub altitude: i32,
14695    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14696    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14697    pub time_usec: u64,
14698}
14699impl GPS_GLOBAL_ORIGIN_DATA {
14700    pub const ENCODED_LEN: usize = 20usize;
14701    pub const DEFAULT: Self = Self {
14702        latitude: 0_i32,
14703        longitude: 0_i32,
14704        altitude: 0_i32,
14705        time_usec: 0_u64,
14706    };
14707    #[cfg(feature = "arbitrary")]
14708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14709        use arbitrary::{Arbitrary, Unstructured};
14710        let mut buf = [0u8; 1024];
14711        rng.fill_bytes(&mut buf);
14712        let mut unstructured = Unstructured::new(&buf);
14713        Self::arbitrary(&mut unstructured).unwrap_or_default()
14714    }
14715}
14716impl Default for GPS_GLOBAL_ORIGIN_DATA {
14717    fn default() -> Self {
14718        Self::DEFAULT.clone()
14719    }
14720}
14721impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14722    type Message = MavMessage;
14723    const ID: u32 = 49u32;
14724    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14725    const EXTRA_CRC: u8 = 39u8;
14726    const ENCODED_LEN: usize = 20usize;
14727    fn deser(
14728        _version: MavlinkVersion,
14729        __input: &[u8],
14730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14731        let avail_len = __input.len();
14732        let mut payload_buf = [0; Self::ENCODED_LEN];
14733        let mut buf = if avail_len < Self::ENCODED_LEN {
14734            payload_buf[0..avail_len].copy_from_slice(__input);
14735            Bytes::new(&payload_buf)
14736        } else {
14737            Bytes::new(__input)
14738        };
14739        let mut __struct = Self::default();
14740        __struct.latitude = buf.get_i32_le();
14741        __struct.longitude = buf.get_i32_le();
14742        __struct.altitude = buf.get_i32_le();
14743        __struct.time_usec = buf.get_u64_le();
14744        Ok(__struct)
14745    }
14746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14747        let mut __tmp = BytesMut::new(bytes);
14748        #[allow(clippy::absurd_extreme_comparisons)]
14749        #[allow(unused_comparisons)]
14750        if __tmp.remaining() < Self::ENCODED_LEN {
14751            panic!(
14752                "buffer is too small (need {} bytes, but got {})",
14753                Self::ENCODED_LEN,
14754                __tmp.remaining(),
14755            )
14756        }
14757        __tmp.put_i32_le(self.latitude);
14758        __tmp.put_i32_le(self.longitude);
14759        __tmp.put_i32_le(self.altitude);
14760        if matches!(version, MavlinkVersion::V2) {
14761            __tmp.put_u64_le(self.time_usec);
14762            let len = __tmp.len();
14763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14764        } else {
14765            __tmp.len()
14766        }
14767    }
14768}
14769#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14770#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14771#[doc = ""]
14772#[doc = "ID: 123"]
14773#[derive(Debug, Clone, PartialEq)]
14774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14776#[cfg_attr(feature = "ts", derive(TS))]
14777#[cfg_attr(feature = "ts", ts(export))]
14778pub struct GPS_INJECT_DATA_DATA {
14779    #[doc = "System ID"]
14780    pub target_system: u8,
14781    #[doc = "Component ID"]
14782    pub target_component: u8,
14783    #[doc = "Data length"]
14784    pub len: u8,
14785    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14786    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14787    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14788    pub data: [u8; 110],
14789}
14790impl GPS_INJECT_DATA_DATA {
14791    pub const ENCODED_LEN: usize = 113usize;
14792    pub const DEFAULT: Self = Self {
14793        target_system: 0_u8,
14794        target_component: 0_u8,
14795        len: 0_u8,
14796        data: [0_u8; 110usize],
14797    };
14798    #[cfg(feature = "arbitrary")]
14799    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14800        use arbitrary::{Arbitrary, Unstructured};
14801        let mut buf = [0u8; 1024];
14802        rng.fill_bytes(&mut buf);
14803        let mut unstructured = Unstructured::new(&buf);
14804        Self::arbitrary(&mut unstructured).unwrap_or_default()
14805    }
14806}
14807impl Default for GPS_INJECT_DATA_DATA {
14808    fn default() -> Self {
14809        Self::DEFAULT.clone()
14810    }
14811}
14812impl MessageData for GPS_INJECT_DATA_DATA {
14813    type Message = MavMessage;
14814    const ID: u32 = 123u32;
14815    const NAME: &'static str = "GPS_INJECT_DATA";
14816    const EXTRA_CRC: u8 = 250u8;
14817    const ENCODED_LEN: usize = 113usize;
14818    fn deser(
14819        _version: MavlinkVersion,
14820        __input: &[u8],
14821    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14822        let avail_len = __input.len();
14823        let mut payload_buf = [0; Self::ENCODED_LEN];
14824        let mut buf = if avail_len < Self::ENCODED_LEN {
14825            payload_buf[0..avail_len].copy_from_slice(__input);
14826            Bytes::new(&payload_buf)
14827        } else {
14828            Bytes::new(__input)
14829        };
14830        let mut __struct = Self::default();
14831        __struct.target_system = buf.get_u8();
14832        __struct.target_component = buf.get_u8();
14833        __struct.len = buf.get_u8();
14834        for v in &mut __struct.data {
14835            let val = buf.get_u8();
14836            *v = val;
14837        }
14838        Ok(__struct)
14839    }
14840    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14841        let mut __tmp = BytesMut::new(bytes);
14842        #[allow(clippy::absurd_extreme_comparisons)]
14843        #[allow(unused_comparisons)]
14844        if __tmp.remaining() < Self::ENCODED_LEN {
14845            panic!(
14846                "buffer is too small (need {} bytes, but got {})",
14847                Self::ENCODED_LEN,
14848                __tmp.remaining(),
14849            )
14850        }
14851        __tmp.put_u8(self.target_system);
14852        __tmp.put_u8(self.target_component);
14853        __tmp.put_u8(self.len);
14854        for val in &self.data {
14855            __tmp.put_u8(*val);
14856        }
14857        if matches!(version, MavlinkVersion::V2) {
14858            let len = __tmp.len();
14859            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14860        } else {
14861            __tmp.len()
14862        }
14863    }
14864}
14865#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14866#[doc = ""]
14867#[doc = "ID: 232"]
14868#[derive(Debug, Clone, PartialEq)]
14869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14871#[cfg_attr(feature = "ts", derive(TS))]
14872#[cfg_attr(feature = "ts", ts(export))]
14873pub struct GPS_INPUT_DATA {
14874    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14875    pub time_usec: u64,
14876    #[doc = "GPS time (from start of GPS week)"]
14877    pub time_week_ms: u32,
14878    #[doc = "Latitude (WGS84)"]
14879    pub lat: i32,
14880    #[doc = "Longitude (WGS84)"]
14881    pub lon: i32,
14882    #[doc = "Altitude (MSL). Positive for up."]
14883    pub alt: f32,
14884    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14885    pub hdop: f32,
14886    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14887    pub vdop: f32,
14888    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14889    pub vn: f32,
14890    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14891    pub ve: f32,
14892    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14893    pub vd: f32,
14894    #[doc = "GPS speed accuracy"]
14895    pub speed_accuracy: f32,
14896    #[doc = "GPS horizontal accuracy"]
14897    pub horiz_accuracy: f32,
14898    #[doc = "GPS vertical accuracy"]
14899    pub vert_accuracy: f32,
14900    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14901    pub ignore_flags: GpsInputIgnoreFlags,
14902    #[doc = "GPS week number"]
14903    pub time_week: u16,
14904    #[doc = "ID of the GPS for multiple GPS inputs"]
14905    pub gps_id: u8,
14906    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14907    pub fix_type: u8,
14908    #[doc = "Number of satellites visible."]
14909    pub satellites_visible: u8,
14910    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14911    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14912    pub yaw: u16,
14913}
14914impl GPS_INPUT_DATA {
14915    pub const ENCODED_LEN: usize = 65usize;
14916    pub const DEFAULT: Self = Self {
14917        time_usec: 0_u64,
14918        time_week_ms: 0_u32,
14919        lat: 0_i32,
14920        lon: 0_i32,
14921        alt: 0.0_f32,
14922        hdop: 0.0_f32,
14923        vdop: 0.0_f32,
14924        vn: 0.0_f32,
14925        ve: 0.0_f32,
14926        vd: 0.0_f32,
14927        speed_accuracy: 0.0_f32,
14928        horiz_accuracy: 0.0_f32,
14929        vert_accuracy: 0.0_f32,
14930        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14931        time_week: 0_u16,
14932        gps_id: 0_u8,
14933        fix_type: 0_u8,
14934        satellites_visible: 0_u8,
14935        yaw: 0_u16,
14936    };
14937    #[cfg(feature = "arbitrary")]
14938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14939        use arbitrary::{Arbitrary, Unstructured};
14940        let mut buf = [0u8; 1024];
14941        rng.fill_bytes(&mut buf);
14942        let mut unstructured = Unstructured::new(&buf);
14943        Self::arbitrary(&mut unstructured).unwrap_or_default()
14944    }
14945}
14946impl Default for GPS_INPUT_DATA {
14947    fn default() -> Self {
14948        Self::DEFAULT.clone()
14949    }
14950}
14951impl MessageData for GPS_INPUT_DATA {
14952    type Message = MavMessage;
14953    const ID: u32 = 232u32;
14954    const NAME: &'static str = "GPS_INPUT";
14955    const EXTRA_CRC: u8 = 151u8;
14956    const ENCODED_LEN: usize = 65usize;
14957    fn deser(
14958        _version: MavlinkVersion,
14959        __input: &[u8],
14960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14961        let avail_len = __input.len();
14962        let mut payload_buf = [0; Self::ENCODED_LEN];
14963        let mut buf = if avail_len < Self::ENCODED_LEN {
14964            payload_buf[0..avail_len].copy_from_slice(__input);
14965            Bytes::new(&payload_buf)
14966        } else {
14967            Bytes::new(__input)
14968        };
14969        let mut __struct = Self::default();
14970        __struct.time_usec = buf.get_u64_le();
14971        __struct.time_week_ms = buf.get_u32_le();
14972        __struct.lat = buf.get_i32_le();
14973        __struct.lon = buf.get_i32_le();
14974        __struct.alt = buf.get_f32_le();
14975        __struct.hdop = buf.get_f32_le();
14976        __struct.vdop = buf.get_f32_le();
14977        __struct.vn = buf.get_f32_le();
14978        __struct.ve = buf.get_f32_le();
14979        __struct.vd = buf.get_f32_le();
14980        __struct.speed_accuracy = buf.get_f32_le();
14981        __struct.horiz_accuracy = buf.get_f32_le();
14982        __struct.vert_accuracy = buf.get_f32_le();
14983        let tmp = buf.get_u16_le();
14984        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14985            tmp & GpsInputIgnoreFlags::all().bits(),
14986        )
14987        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14988            flag_type: "GpsInputIgnoreFlags",
14989            value: tmp as u32,
14990        })?;
14991        __struct.time_week = buf.get_u16_le();
14992        __struct.gps_id = buf.get_u8();
14993        __struct.fix_type = buf.get_u8();
14994        __struct.satellites_visible = buf.get_u8();
14995        __struct.yaw = buf.get_u16_le();
14996        Ok(__struct)
14997    }
14998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14999        let mut __tmp = BytesMut::new(bytes);
15000        #[allow(clippy::absurd_extreme_comparisons)]
15001        #[allow(unused_comparisons)]
15002        if __tmp.remaining() < Self::ENCODED_LEN {
15003            panic!(
15004                "buffer is too small (need {} bytes, but got {})",
15005                Self::ENCODED_LEN,
15006                __tmp.remaining(),
15007            )
15008        }
15009        __tmp.put_u64_le(self.time_usec);
15010        __tmp.put_u32_le(self.time_week_ms);
15011        __tmp.put_i32_le(self.lat);
15012        __tmp.put_i32_le(self.lon);
15013        __tmp.put_f32_le(self.alt);
15014        __tmp.put_f32_le(self.hdop);
15015        __tmp.put_f32_le(self.vdop);
15016        __tmp.put_f32_le(self.vn);
15017        __tmp.put_f32_le(self.ve);
15018        __tmp.put_f32_le(self.vd);
15019        __tmp.put_f32_le(self.speed_accuracy);
15020        __tmp.put_f32_le(self.horiz_accuracy);
15021        __tmp.put_f32_le(self.vert_accuracy);
15022        __tmp.put_u16_le(self.ignore_flags.bits());
15023        __tmp.put_u16_le(self.time_week);
15024        __tmp.put_u8(self.gps_id);
15025        __tmp.put_u8(self.fix_type);
15026        __tmp.put_u8(self.satellites_visible);
15027        if matches!(version, MavlinkVersion::V2) {
15028            __tmp.put_u16_le(self.yaw);
15029            let len = __tmp.len();
15030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15031        } else {
15032            __tmp.len()
15033        }
15034    }
15035}
15036#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15037#[doc = ""]
15038#[doc = "ID: 24"]
15039#[derive(Debug, Clone, PartialEq)]
15040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15042#[cfg_attr(feature = "ts", derive(TS))]
15043#[cfg_attr(feature = "ts", ts(export))]
15044pub struct GPS_RAW_INT_DATA {
15045    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15046    pub time_usec: u64,
15047    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15048    pub lat: i32,
15049    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15050    pub lon: i32,
15051    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15052    pub alt: i32,
15053    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15054    pub eph: u16,
15055    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15056    pub epv: u16,
15057    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15058    pub vel: u16,
15059    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15060    pub cog: u16,
15061    #[doc = "GPS fix type."]
15062    pub fix_type: GpsFixType,
15063    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15064    pub satellites_visible: u8,
15065    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15066    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15067    pub alt_ellipsoid: i32,
15068    #[doc = "Position uncertainty."]
15069    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15070    pub h_acc: u32,
15071    #[doc = "Altitude uncertainty."]
15072    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15073    pub v_acc: u32,
15074    #[doc = "Speed uncertainty."]
15075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15076    pub vel_acc: u32,
15077    #[doc = "Heading / track uncertainty"]
15078    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15079    pub hdg_acc: u32,
15080    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15081    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15082    pub yaw: u16,
15083}
15084impl GPS_RAW_INT_DATA {
15085    pub const ENCODED_LEN: usize = 52usize;
15086    pub const DEFAULT: Self = Self {
15087        time_usec: 0_u64,
15088        lat: 0_i32,
15089        lon: 0_i32,
15090        alt: 0_i32,
15091        eph: 0_u16,
15092        epv: 0_u16,
15093        vel: 0_u16,
15094        cog: 0_u16,
15095        fix_type: GpsFixType::DEFAULT,
15096        satellites_visible: 0_u8,
15097        alt_ellipsoid: 0_i32,
15098        h_acc: 0_u32,
15099        v_acc: 0_u32,
15100        vel_acc: 0_u32,
15101        hdg_acc: 0_u32,
15102        yaw: 0_u16,
15103    };
15104    #[cfg(feature = "arbitrary")]
15105    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15106        use arbitrary::{Arbitrary, Unstructured};
15107        let mut buf = [0u8; 1024];
15108        rng.fill_bytes(&mut buf);
15109        let mut unstructured = Unstructured::new(&buf);
15110        Self::arbitrary(&mut unstructured).unwrap_or_default()
15111    }
15112}
15113impl Default for GPS_RAW_INT_DATA {
15114    fn default() -> Self {
15115        Self::DEFAULT.clone()
15116    }
15117}
15118impl MessageData for GPS_RAW_INT_DATA {
15119    type Message = MavMessage;
15120    const ID: u32 = 24u32;
15121    const NAME: &'static str = "GPS_RAW_INT";
15122    const EXTRA_CRC: u8 = 24u8;
15123    const ENCODED_LEN: usize = 52usize;
15124    fn deser(
15125        _version: MavlinkVersion,
15126        __input: &[u8],
15127    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15128        let avail_len = __input.len();
15129        let mut payload_buf = [0; Self::ENCODED_LEN];
15130        let mut buf = if avail_len < Self::ENCODED_LEN {
15131            payload_buf[0..avail_len].copy_from_slice(__input);
15132            Bytes::new(&payload_buf)
15133        } else {
15134            Bytes::new(__input)
15135        };
15136        let mut __struct = Self::default();
15137        __struct.time_usec = buf.get_u64_le();
15138        __struct.lat = buf.get_i32_le();
15139        __struct.lon = buf.get_i32_le();
15140        __struct.alt = buf.get_i32_le();
15141        __struct.eph = buf.get_u16_le();
15142        __struct.epv = buf.get_u16_le();
15143        __struct.vel = buf.get_u16_le();
15144        __struct.cog = buf.get_u16_le();
15145        let tmp = buf.get_u8();
15146        __struct.fix_type =
15147            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15148                enum_type: "GpsFixType",
15149                value: tmp as u32,
15150            })?;
15151        __struct.satellites_visible = buf.get_u8();
15152        __struct.alt_ellipsoid = buf.get_i32_le();
15153        __struct.h_acc = buf.get_u32_le();
15154        __struct.v_acc = buf.get_u32_le();
15155        __struct.vel_acc = buf.get_u32_le();
15156        __struct.hdg_acc = buf.get_u32_le();
15157        __struct.yaw = buf.get_u16_le();
15158        Ok(__struct)
15159    }
15160    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15161        let mut __tmp = BytesMut::new(bytes);
15162        #[allow(clippy::absurd_extreme_comparisons)]
15163        #[allow(unused_comparisons)]
15164        if __tmp.remaining() < Self::ENCODED_LEN {
15165            panic!(
15166                "buffer is too small (need {} bytes, but got {})",
15167                Self::ENCODED_LEN,
15168                __tmp.remaining(),
15169            )
15170        }
15171        __tmp.put_u64_le(self.time_usec);
15172        __tmp.put_i32_le(self.lat);
15173        __tmp.put_i32_le(self.lon);
15174        __tmp.put_i32_le(self.alt);
15175        __tmp.put_u16_le(self.eph);
15176        __tmp.put_u16_le(self.epv);
15177        __tmp.put_u16_le(self.vel);
15178        __tmp.put_u16_le(self.cog);
15179        __tmp.put_u8(self.fix_type as u8);
15180        __tmp.put_u8(self.satellites_visible);
15181        if matches!(version, MavlinkVersion::V2) {
15182            __tmp.put_i32_le(self.alt_ellipsoid);
15183            __tmp.put_u32_le(self.h_acc);
15184            __tmp.put_u32_le(self.v_acc);
15185            __tmp.put_u32_le(self.vel_acc);
15186            __tmp.put_u32_le(self.hdg_acc);
15187            __tmp.put_u16_le(self.yaw);
15188            let len = __tmp.len();
15189            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15190        } else {
15191            __tmp.len()
15192        }
15193    }
15194}
15195#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15196#[doc = ""]
15197#[doc = "ID: 233"]
15198#[derive(Debug, Clone, PartialEq)]
15199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15201#[cfg_attr(feature = "ts", derive(TS))]
15202#[cfg_attr(feature = "ts", ts(export))]
15203pub struct GPS_RTCM_DATA_DATA {
15204    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15205    pub flags: u8,
15206    #[doc = "data length"]
15207    pub len: u8,
15208    #[doc = "RTCM message (may be fragmented)"]
15209    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15210    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15211    pub data: [u8; 180],
15212}
15213impl GPS_RTCM_DATA_DATA {
15214    pub const ENCODED_LEN: usize = 182usize;
15215    pub const DEFAULT: Self = Self {
15216        flags: 0_u8,
15217        len: 0_u8,
15218        data: [0_u8; 180usize],
15219    };
15220    #[cfg(feature = "arbitrary")]
15221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15222        use arbitrary::{Arbitrary, Unstructured};
15223        let mut buf = [0u8; 1024];
15224        rng.fill_bytes(&mut buf);
15225        let mut unstructured = Unstructured::new(&buf);
15226        Self::arbitrary(&mut unstructured).unwrap_or_default()
15227    }
15228}
15229impl Default for GPS_RTCM_DATA_DATA {
15230    fn default() -> Self {
15231        Self::DEFAULT.clone()
15232    }
15233}
15234impl MessageData for GPS_RTCM_DATA_DATA {
15235    type Message = MavMessage;
15236    const ID: u32 = 233u32;
15237    const NAME: &'static str = "GPS_RTCM_DATA";
15238    const EXTRA_CRC: u8 = 35u8;
15239    const ENCODED_LEN: usize = 182usize;
15240    fn deser(
15241        _version: MavlinkVersion,
15242        __input: &[u8],
15243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15244        let avail_len = __input.len();
15245        let mut payload_buf = [0; Self::ENCODED_LEN];
15246        let mut buf = if avail_len < Self::ENCODED_LEN {
15247            payload_buf[0..avail_len].copy_from_slice(__input);
15248            Bytes::new(&payload_buf)
15249        } else {
15250            Bytes::new(__input)
15251        };
15252        let mut __struct = Self::default();
15253        __struct.flags = buf.get_u8();
15254        __struct.len = buf.get_u8();
15255        for v in &mut __struct.data {
15256            let val = buf.get_u8();
15257            *v = val;
15258        }
15259        Ok(__struct)
15260    }
15261    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15262        let mut __tmp = BytesMut::new(bytes);
15263        #[allow(clippy::absurd_extreme_comparisons)]
15264        #[allow(unused_comparisons)]
15265        if __tmp.remaining() < Self::ENCODED_LEN {
15266            panic!(
15267                "buffer is too small (need {} bytes, but got {})",
15268                Self::ENCODED_LEN,
15269                __tmp.remaining(),
15270            )
15271        }
15272        __tmp.put_u8(self.flags);
15273        __tmp.put_u8(self.len);
15274        for val in &self.data {
15275            __tmp.put_u8(*val);
15276        }
15277        if matches!(version, MavlinkVersion::V2) {
15278            let len = __tmp.len();
15279            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15280        } else {
15281            __tmp.len()
15282        }
15283    }
15284}
15285#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15286#[doc = ""]
15287#[doc = "ID: 127"]
15288#[derive(Debug, Clone, PartialEq)]
15289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15291#[cfg_attr(feature = "ts", derive(TS))]
15292#[cfg_attr(feature = "ts", ts(export))]
15293pub struct GPS_RTK_DATA {
15294    #[doc = "Time since boot of last baseline message received."]
15295    pub time_last_baseline_ms: u32,
15296    #[doc = "GPS Time of Week of last baseline"]
15297    pub tow: u32,
15298    #[doc = "Current baseline in ECEF x or NED north component."]
15299    pub baseline_a_mm: i32,
15300    #[doc = "Current baseline in ECEF y or NED east component."]
15301    pub baseline_b_mm: i32,
15302    #[doc = "Current baseline in ECEF z or NED down component."]
15303    pub baseline_c_mm: i32,
15304    #[doc = "Current estimate of baseline accuracy."]
15305    pub accuracy: u32,
15306    #[doc = "Current number of integer ambiguity hypotheses."]
15307    pub iar_num_hypotheses: i32,
15308    #[doc = "GPS Week Number of last baseline"]
15309    pub wn: u16,
15310    #[doc = "Identification of connected RTK receiver."]
15311    pub rtk_receiver_id: u8,
15312    #[doc = "GPS-specific health report for RTK data."]
15313    pub rtk_health: u8,
15314    #[doc = "Rate of baseline messages being received by GPS"]
15315    pub rtk_rate: u8,
15316    #[doc = "Current number of sats used for RTK calculation."]
15317    pub nsats: u8,
15318    #[doc = "Coordinate system of baseline"]
15319    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15320}
15321impl GPS_RTK_DATA {
15322    pub const ENCODED_LEN: usize = 35usize;
15323    pub const DEFAULT: Self = Self {
15324        time_last_baseline_ms: 0_u32,
15325        tow: 0_u32,
15326        baseline_a_mm: 0_i32,
15327        baseline_b_mm: 0_i32,
15328        baseline_c_mm: 0_i32,
15329        accuracy: 0_u32,
15330        iar_num_hypotheses: 0_i32,
15331        wn: 0_u16,
15332        rtk_receiver_id: 0_u8,
15333        rtk_health: 0_u8,
15334        rtk_rate: 0_u8,
15335        nsats: 0_u8,
15336        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15337    };
15338    #[cfg(feature = "arbitrary")]
15339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15340        use arbitrary::{Arbitrary, Unstructured};
15341        let mut buf = [0u8; 1024];
15342        rng.fill_bytes(&mut buf);
15343        let mut unstructured = Unstructured::new(&buf);
15344        Self::arbitrary(&mut unstructured).unwrap_or_default()
15345    }
15346}
15347impl Default for GPS_RTK_DATA {
15348    fn default() -> Self {
15349        Self::DEFAULT.clone()
15350    }
15351}
15352impl MessageData for GPS_RTK_DATA {
15353    type Message = MavMessage;
15354    const ID: u32 = 127u32;
15355    const NAME: &'static str = "GPS_RTK";
15356    const EXTRA_CRC: u8 = 25u8;
15357    const ENCODED_LEN: usize = 35usize;
15358    fn deser(
15359        _version: MavlinkVersion,
15360        __input: &[u8],
15361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15362        let avail_len = __input.len();
15363        let mut payload_buf = [0; Self::ENCODED_LEN];
15364        let mut buf = if avail_len < Self::ENCODED_LEN {
15365            payload_buf[0..avail_len].copy_from_slice(__input);
15366            Bytes::new(&payload_buf)
15367        } else {
15368            Bytes::new(__input)
15369        };
15370        let mut __struct = Self::default();
15371        __struct.time_last_baseline_ms = buf.get_u32_le();
15372        __struct.tow = buf.get_u32_le();
15373        __struct.baseline_a_mm = buf.get_i32_le();
15374        __struct.baseline_b_mm = buf.get_i32_le();
15375        __struct.baseline_c_mm = buf.get_i32_le();
15376        __struct.accuracy = buf.get_u32_le();
15377        __struct.iar_num_hypotheses = buf.get_i32_le();
15378        __struct.wn = buf.get_u16_le();
15379        __struct.rtk_receiver_id = buf.get_u8();
15380        __struct.rtk_health = buf.get_u8();
15381        __struct.rtk_rate = buf.get_u8();
15382        __struct.nsats = buf.get_u8();
15383        let tmp = buf.get_u8();
15384        __struct.baseline_coords_type =
15385            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15386                enum_type: "RtkBaselineCoordinateSystem",
15387                value: tmp as u32,
15388            })?;
15389        Ok(__struct)
15390    }
15391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15392        let mut __tmp = BytesMut::new(bytes);
15393        #[allow(clippy::absurd_extreme_comparisons)]
15394        #[allow(unused_comparisons)]
15395        if __tmp.remaining() < Self::ENCODED_LEN {
15396            panic!(
15397                "buffer is too small (need {} bytes, but got {})",
15398                Self::ENCODED_LEN,
15399                __tmp.remaining(),
15400            )
15401        }
15402        __tmp.put_u32_le(self.time_last_baseline_ms);
15403        __tmp.put_u32_le(self.tow);
15404        __tmp.put_i32_le(self.baseline_a_mm);
15405        __tmp.put_i32_le(self.baseline_b_mm);
15406        __tmp.put_i32_le(self.baseline_c_mm);
15407        __tmp.put_u32_le(self.accuracy);
15408        __tmp.put_i32_le(self.iar_num_hypotheses);
15409        __tmp.put_u16_le(self.wn);
15410        __tmp.put_u8(self.rtk_receiver_id);
15411        __tmp.put_u8(self.rtk_health);
15412        __tmp.put_u8(self.rtk_rate);
15413        __tmp.put_u8(self.nsats);
15414        __tmp.put_u8(self.baseline_coords_type as u8);
15415        if matches!(version, MavlinkVersion::V2) {
15416            let len = __tmp.len();
15417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15418        } else {
15419            __tmp.len()
15420        }
15421    }
15422}
15423#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15424#[doc = ""]
15425#[doc = "ID: 25"]
15426#[derive(Debug, Clone, PartialEq)]
15427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15429#[cfg_attr(feature = "ts", derive(TS))]
15430#[cfg_attr(feature = "ts", ts(export))]
15431pub struct GPS_STATUS_DATA {
15432    #[doc = "Number of satellites visible"]
15433    pub satellites_visible: u8,
15434    #[doc = "Global satellite ID"]
15435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15436    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15437    pub satellite_prn: [u8; 20],
15438    #[doc = "0: Satellite not used, 1: used for localization"]
15439    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15440    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15441    pub satellite_used: [u8; 20],
15442    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15443    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15444    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15445    pub satellite_elevation: [u8; 20],
15446    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15447    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15448    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15449    pub satellite_azimuth: [u8; 20],
15450    #[doc = "Signal to noise ratio of satellite"]
15451    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15452    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15453    pub satellite_snr: [u8; 20],
15454}
15455impl GPS_STATUS_DATA {
15456    pub const ENCODED_LEN: usize = 101usize;
15457    pub const DEFAULT: Self = Self {
15458        satellites_visible: 0_u8,
15459        satellite_prn: [0_u8; 20usize],
15460        satellite_used: [0_u8; 20usize],
15461        satellite_elevation: [0_u8; 20usize],
15462        satellite_azimuth: [0_u8; 20usize],
15463        satellite_snr: [0_u8; 20usize],
15464    };
15465    #[cfg(feature = "arbitrary")]
15466    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15467        use arbitrary::{Arbitrary, Unstructured};
15468        let mut buf = [0u8; 1024];
15469        rng.fill_bytes(&mut buf);
15470        let mut unstructured = Unstructured::new(&buf);
15471        Self::arbitrary(&mut unstructured).unwrap_or_default()
15472    }
15473}
15474impl Default for GPS_STATUS_DATA {
15475    fn default() -> Self {
15476        Self::DEFAULT.clone()
15477    }
15478}
15479impl MessageData for GPS_STATUS_DATA {
15480    type Message = MavMessage;
15481    const ID: u32 = 25u32;
15482    const NAME: &'static str = "GPS_STATUS";
15483    const EXTRA_CRC: u8 = 23u8;
15484    const ENCODED_LEN: usize = 101usize;
15485    fn deser(
15486        _version: MavlinkVersion,
15487        __input: &[u8],
15488    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15489        let avail_len = __input.len();
15490        let mut payload_buf = [0; Self::ENCODED_LEN];
15491        let mut buf = if avail_len < Self::ENCODED_LEN {
15492            payload_buf[0..avail_len].copy_from_slice(__input);
15493            Bytes::new(&payload_buf)
15494        } else {
15495            Bytes::new(__input)
15496        };
15497        let mut __struct = Self::default();
15498        __struct.satellites_visible = buf.get_u8();
15499        for v in &mut __struct.satellite_prn {
15500            let val = buf.get_u8();
15501            *v = val;
15502        }
15503        for v in &mut __struct.satellite_used {
15504            let val = buf.get_u8();
15505            *v = val;
15506        }
15507        for v in &mut __struct.satellite_elevation {
15508            let val = buf.get_u8();
15509            *v = val;
15510        }
15511        for v in &mut __struct.satellite_azimuth {
15512            let val = buf.get_u8();
15513            *v = val;
15514        }
15515        for v in &mut __struct.satellite_snr {
15516            let val = buf.get_u8();
15517            *v = val;
15518        }
15519        Ok(__struct)
15520    }
15521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15522        let mut __tmp = BytesMut::new(bytes);
15523        #[allow(clippy::absurd_extreme_comparisons)]
15524        #[allow(unused_comparisons)]
15525        if __tmp.remaining() < Self::ENCODED_LEN {
15526            panic!(
15527                "buffer is too small (need {} bytes, but got {})",
15528                Self::ENCODED_LEN,
15529                __tmp.remaining(),
15530            )
15531        }
15532        __tmp.put_u8(self.satellites_visible);
15533        for val in &self.satellite_prn {
15534            __tmp.put_u8(*val);
15535        }
15536        for val in &self.satellite_used {
15537            __tmp.put_u8(*val);
15538        }
15539        for val in &self.satellite_elevation {
15540            __tmp.put_u8(*val);
15541        }
15542        for val in &self.satellite_azimuth {
15543            __tmp.put_u8(*val);
15544        }
15545        for val in &self.satellite_snr {
15546            __tmp.put_u8(*val);
15547        }
15548        if matches!(version, MavlinkVersion::V2) {
15549            let len = __tmp.len();
15550            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15551        } else {
15552            __tmp.len()
15553        }
15554    }
15555}
15556#[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_END."]
15557#[doc = ""]
15558#[doc = "ID: 415"]
15559#[derive(Debug, Clone, PartialEq)]
15560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15562#[cfg_attr(feature = "ts", derive(TS))]
15563#[cfg_attr(feature = "ts", ts(export))]
15564pub struct GROUP_END_DATA {
15565    #[doc = "Timestamp (UNIX Epoch time or time since system boot).         The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15566    pub time_usec: u64,
15567    #[doc = "Mission-unique group id (from MAV_CMD_GROUP_END)."]
15568    pub group_id: u32,
15569    #[doc = "CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message."]
15570    pub mission_checksum: u32,
15571}
15572impl GROUP_END_DATA {
15573    pub const ENCODED_LEN: usize = 16usize;
15574    pub const DEFAULT: Self = Self {
15575        time_usec: 0_u64,
15576        group_id: 0_u32,
15577        mission_checksum: 0_u32,
15578    };
15579    #[cfg(feature = "arbitrary")]
15580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15581        use arbitrary::{Arbitrary, Unstructured};
15582        let mut buf = [0u8; 1024];
15583        rng.fill_bytes(&mut buf);
15584        let mut unstructured = Unstructured::new(&buf);
15585        Self::arbitrary(&mut unstructured).unwrap_or_default()
15586    }
15587}
15588impl Default for GROUP_END_DATA {
15589    fn default() -> Self {
15590        Self::DEFAULT.clone()
15591    }
15592}
15593impl MessageData for GROUP_END_DATA {
15594    type Message = MavMessage;
15595    const ID: u32 = 415u32;
15596    const NAME: &'static str = "GROUP_END";
15597    const EXTRA_CRC: u8 = 161u8;
15598    const ENCODED_LEN: usize = 16usize;
15599    fn deser(
15600        _version: MavlinkVersion,
15601        __input: &[u8],
15602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15603        let avail_len = __input.len();
15604        let mut payload_buf = [0; Self::ENCODED_LEN];
15605        let mut buf = if avail_len < Self::ENCODED_LEN {
15606            payload_buf[0..avail_len].copy_from_slice(__input);
15607            Bytes::new(&payload_buf)
15608        } else {
15609            Bytes::new(__input)
15610        };
15611        let mut __struct = Self::default();
15612        __struct.time_usec = buf.get_u64_le();
15613        __struct.group_id = buf.get_u32_le();
15614        __struct.mission_checksum = buf.get_u32_le();
15615        Ok(__struct)
15616    }
15617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15618        let mut __tmp = BytesMut::new(bytes);
15619        #[allow(clippy::absurd_extreme_comparisons)]
15620        #[allow(unused_comparisons)]
15621        if __tmp.remaining() < Self::ENCODED_LEN {
15622            panic!(
15623                "buffer is too small (need {} bytes, but got {})",
15624                Self::ENCODED_LEN,
15625                __tmp.remaining(),
15626            )
15627        }
15628        __tmp.put_u64_le(self.time_usec);
15629        __tmp.put_u32_le(self.group_id);
15630        __tmp.put_u32_le(self.mission_checksum);
15631        if matches!(version, MavlinkVersion::V2) {
15632            let len = __tmp.len();
15633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15634        } else {
15635            __tmp.len()
15636        }
15637    }
15638}
15639#[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_START."]
15640#[doc = ""]
15641#[doc = "ID: 414"]
15642#[derive(Debug, Clone, PartialEq)]
15643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15645#[cfg_attr(feature = "ts", derive(TS))]
15646#[cfg_attr(feature = "ts", ts(export))]
15647pub struct GROUP_START_DATA {
15648    #[doc = "Timestamp (UNIX Epoch time or time since system boot).         The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15649    pub time_usec: u64,
15650    #[doc = "Mission-unique group id (from MAV_CMD_GROUP_START)."]
15651    pub group_id: u32,
15652    #[doc = "CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message."]
15653    pub mission_checksum: u32,
15654}
15655impl GROUP_START_DATA {
15656    pub const ENCODED_LEN: usize = 16usize;
15657    pub const DEFAULT: Self = Self {
15658        time_usec: 0_u64,
15659        group_id: 0_u32,
15660        mission_checksum: 0_u32,
15661    };
15662    #[cfg(feature = "arbitrary")]
15663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15664        use arbitrary::{Arbitrary, Unstructured};
15665        let mut buf = [0u8; 1024];
15666        rng.fill_bytes(&mut buf);
15667        let mut unstructured = Unstructured::new(&buf);
15668        Self::arbitrary(&mut unstructured).unwrap_or_default()
15669    }
15670}
15671impl Default for GROUP_START_DATA {
15672    fn default() -> Self {
15673        Self::DEFAULT.clone()
15674    }
15675}
15676impl MessageData for GROUP_START_DATA {
15677    type Message = MavMessage;
15678    const ID: u32 = 414u32;
15679    const NAME: &'static str = "GROUP_START";
15680    const EXTRA_CRC: u8 = 109u8;
15681    const ENCODED_LEN: usize = 16usize;
15682    fn deser(
15683        _version: MavlinkVersion,
15684        __input: &[u8],
15685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15686        let avail_len = __input.len();
15687        let mut payload_buf = [0; Self::ENCODED_LEN];
15688        let mut buf = if avail_len < Self::ENCODED_LEN {
15689            payload_buf[0..avail_len].copy_from_slice(__input);
15690            Bytes::new(&payload_buf)
15691        } else {
15692            Bytes::new(__input)
15693        };
15694        let mut __struct = Self::default();
15695        __struct.time_usec = buf.get_u64_le();
15696        __struct.group_id = buf.get_u32_le();
15697        __struct.mission_checksum = buf.get_u32_le();
15698        Ok(__struct)
15699    }
15700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15701        let mut __tmp = BytesMut::new(bytes);
15702        #[allow(clippy::absurd_extreme_comparisons)]
15703        #[allow(unused_comparisons)]
15704        if __tmp.remaining() < Self::ENCODED_LEN {
15705            panic!(
15706                "buffer is too small (need {} bytes, but got {})",
15707                Self::ENCODED_LEN,
15708                __tmp.remaining(),
15709            )
15710        }
15711        __tmp.put_u64_le(self.time_usec);
15712        __tmp.put_u32_le(self.group_id);
15713        __tmp.put_u32_le(self.mission_checksum);
15714        if matches!(version, MavlinkVersion::V2) {
15715            let len = __tmp.len();
15716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15717        } else {
15718            __tmp.len()
15719        }
15720    }
15721}
15722#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15723#[doc = ""]
15724#[doc = "ID: 0"]
15725#[derive(Debug, Clone, PartialEq)]
15726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15728#[cfg_attr(feature = "ts", derive(TS))]
15729#[cfg_attr(feature = "ts", ts(export))]
15730pub struct HEARTBEAT_DATA {
15731    #[doc = "A bitfield for use for autopilot-specific flags"]
15732    pub custom_mode: u32,
15733    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15734    pub mavtype: MavType,
15735    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15736    pub autopilot: MavAutopilot,
15737    #[doc = "System mode bitmap."]
15738    pub base_mode: MavModeFlag,
15739    #[doc = "System status flag."]
15740    pub system_status: MavState,
15741    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15742    pub mavlink_version: u8,
15743}
15744impl HEARTBEAT_DATA {
15745    pub const ENCODED_LEN: usize = 9usize;
15746    pub const DEFAULT: Self = Self {
15747        custom_mode: 0_u32,
15748        mavtype: MavType::DEFAULT,
15749        autopilot: MavAutopilot::DEFAULT,
15750        base_mode: MavModeFlag::DEFAULT,
15751        system_status: MavState::DEFAULT,
15752        mavlink_version: MINOR_MAVLINK_VERSION,
15753    };
15754    #[cfg(feature = "arbitrary")]
15755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15756        use arbitrary::{Arbitrary, Unstructured};
15757        let mut buf = [0u8; 1024];
15758        rng.fill_bytes(&mut buf);
15759        let mut unstructured = Unstructured::new(&buf);
15760        Self::arbitrary(&mut unstructured).unwrap_or_default()
15761    }
15762}
15763impl Default for HEARTBEAT_DATA {
15764    fn default() -> Self {
15765        Self::DEFAULT.clone()
15766    }
15767}
15768impl MessageData for HEARTBEAT_DATA {
15769    type Message = MavMessage;
15770    const ID: u32 = 0u32;
15771    const NAME: &'static str = "HEARTBEAT";
15772    const EXTRA_CRC: u8 = 50u8;
15773    const ENCODED_LEN: usize = 9usize;
15774    fn deser(
15775        _version: MavlinkVersion,
15776        __input: &[u8],
15777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15778        let avail_len = __input.len();
15779        let mut payload_buf = [0; Self::ENCODED_LEN];
15780        let mut buf = if avail_len < Self::ENCODED_LEN {
15781            payload_buf[0..avail_len].copy_from_slice(__input);
15782            Bytes::new(&payload_buf)
15783        } else {
15784            Bytes::new(__input)
15785        };
15786        let mut __struct = Self::default();
15787        __struct.custom_mode = buf.get_u32_le();
15788        let tmp = buf.get_u8();
15789        __struct.mavtype =
15790            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15791                enum_type: "MavType",
15792                value: tmp as u32,
15793            })?;
15794        let tmp = buf.get_u8();
15795        __struct.autopilot =
15796            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15797                enum_type: "MavAutopilot",
15798                value: tmp as u32,
15799            })?;
15800        let tmp = buf.get_u8();
15801        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15802            ::mavlink_core::error::ParserError::InvalidFlag {
15803                flag_type: "MavModeFlag",
15804                value: tmp as u32,
15805            },
15806        )?;
15807        let tmp = buf.get_u8();
15808        __struct.system_status =
15809            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15810                enum_type: "MavState",
15811                value: tmp as u32,
15812            })?;
15813        __struct.mavlink_version = buf.get_u8();
15814        Ok(__struct)
15815    }
15816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15817        let mut __tmp = BytesMut::new(bytes);
15818        #[allow(clippy::absurd_extreme_comparisons)]
15819        #[allow(unused_comparisons)]
15820        if __tmp.remaining() < Self::ENCODED_LEN {
15821            panic!(
15822                "buffer is too small (need {} bytes, but got {})",
15823                Self::ENCODED_LEN,
15824                __tmp.remaining(),
15825            )
15826        }
15827        __tmp.put_u32_le(self.custom_mode);
15828        __tmp.put_u8(self.mavtype as u8);
15829        __tmp.put_u8(self.autopilot as u8);
15830        __tmp.put_u8(self.base_mode.bits());
15831        __tmp.put_u8(self.system_status as u8);
15832        __tmp.put_u8(self.mavlink_version);
15833        if matches!(version, MavlinkVersion::V2) {
15834            let len = __tmp.len();
15835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15836        } else {
15837            __tmp.len()
15838        }
15839    }
15840}
15841#[doc = "The IMU readings in SI units in NED body frame."]
15842#[doc = ""]
15843#[doc = "ID: 105"]
15844#[derive(Debug, Clone, PartialEq)]
15845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15847#[cfg_attr(feature = "ts", derive(TS))]
15848#[cfg_attr(feature = "ts", ts(export))]
15849pub struct HIGHRES_IMU_DATA {
15850    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15851    pub time_usec: u64,
15852    #[doc = "X acceleration"]
15853    pub xacc: f32,
15854    #[doc = "Y acceleration"]
15855    pub yacc: f32,
15856    #[doc = "Z acceleration"]
15857    pub zacc: f32,
15858    #[doc = "Angular speed around X axis"]
15859    pub xgyro: f32,
15860    #[doc = "Angular speed around Y axis"]
15861    pub ygyro: f32,
15862    #[doc = "Angular speed around Z axis"]
15863    pub zgyro: f32,
15864    #[doc = "X Magnetic field"]
15865    pub xmag: f32,
15866    #[doc = "Y Magnetic field"]
15867    pub ymag: f32,
15868    #[doc = "Z Magnetic field"]
15869    pub zmag: f32,
15870    #[doc = "Absolute pressure"]
15871    pub abs_pressure: f32,
15872    #[doc = "Differential pressure"]
15873    pub diff_pressure: f32,
15874    #[doc = "Altitude calculated from pressure"]
15875    pub pressure_alt: f32,
15876    #[doc = "Temperature"]
15877    pub temperature: f32,
15878    #[doc = "Bitmap for fields that have updated since last message"]
15879    pub fields_updated: HighresImuUpdatedFlags,
15880    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15882    pub id: u8,
15883}
15884impl HIGHRES_IMU_DATA {
15885    pub const ENCODED_LEN: usize = 63usize;
15886    pub const DEFAULT: Self = Self {
15887        time_usec: 0_u64,
15888        xacc: 0.0_f32,
15889        yacc: 0.0_f32,
15890        zacc: 0.0_f32,
15891        xgyro: 0.0_f32,
15892        ygyro: 0.0_f32,
15893        zgyro: 0.0_f32,
15894        xmag: 0.0_f32,
15895        ymag: 0.0_f32,
15896        zmag: 0.0_f32,
15897        abs_pressure: 0.0_f32,
15898        diff_pressure: 0.0_f32,
15899        pressure_alt: 0.0_f32,
15900        temperature: 0.0_f32,
15901        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15902        id: 0_u8,
15903    };
15904    #[cfg(feature = "arbitrary")]
15905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15906        use arbitrary::{Arbitrary, Unstructured};
15907        let mut buf = [0u8; 1024];
15908        rng.fill_bytes(&mut buf);
15909        let mut unstructured = Unstructured::new(&buf);
15910        Self::arbitrary(&mut unstructured).unwrap_or_default()
15911    }
15912}
15913impl Default for HIGHRES_IMU_DATA {
15914    fn default() -> Self {
15915        Self::DEFAULT.clone()
15916    }
15917}
15918impl MessageData for HIGHRES_IMU_DATA {
15919    type Message = MavMessage;
15920    const ID: u32 = 105u32;
15921    const NAME: &'static str = "HIGHRES_IMU";
15922    const EXTRA_CRC: u8 = 93u8;
15923    const ENCODED_LEN: usize = 63usize;
15924    fn deser(
15925        _version: MavlinkVersion,
15926        __input: &[u8],
15927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15928        let avail_len = __input.len();
15929        let mut payload_buf = [0; Self::ENCODED_LEN];
15930        let mut buf = if avail_len < Self::ENCODED_LEN {
15931            payload_buf[0..avail_len].copy_from_slice(__input);
15932            Bytes::new(&payload_buf)
15933        } else {
15934            Bytes::new(__input)
15935        };
15936        let mut __struct = Self::default();
15937        __struct.time_usec = buf.get_u64_le();
15938        __struct.xacc = buf.get_f32_le();
15939        __struct.yacc = buf.get_f32_le();
15940        __struct.zacc = buf.get_f32_le();
15941        __struct.xgyro = buf.get_f32_le();
15942        __struct.ygyro = buf.get_f32_le();
15943        __struct.zgyro = buf.get_f32_le();
15944        __struct.xmag = buf.get_f32_le();
15945        __struct.ymag = buf.get_f32_le();
15946        __struct.zmag = buf.get_f32_le();
15947        __struct.abs_pressure = buf.get_f32_le();
15948        __struct.diff_pressure = buf.get_f32_le();
15949        __struct.pressure_alt = buf.get_f32_le();
15950        __struct.temperature = buf.get_f32_le();
15951        let tmp = buf.get_u16_le();
15952        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15953            tmp & HighresImuUpdatedFlags::all().bits(),
15954        )
15955        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15956            flag_type: "HighresImuUpdatedFlags",
15957            value: tmp as u32,
15958        })?;
15959        __struct.id = buf.get_u8();
15960        Ok(__struct)
15961    }
15962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15963        let mut __tmp = BytesMut::new(bytes);
15964        #[allow(clippy::absurd_extreme_comparisons)]
15965        #[allow(unused_comparisons)]
15966        if __tmp.remaining() < Self::ENCODED_LEN {
15967            panic!(
15968                "buffer is too small (need {} bytes, but got {})",
15969                Self::ENCODED_LEN,
15970                __tmp.remaining(),
15971            )
15972        }
15973        __tmp.put_u64_le(self.time_usec);
15974        __tmp.put_f32_le(self.xacc);
15975        __tmp.put_f32_le(self.yacc);
15976        __tmp.put_f32_le(self.zacc);
15977        __tmp.put_f32_le(self.xgyro);
15978        __tmp.put_f32_le(self.ygyro);
15979        __tmp.put_f32_le(self.zgyro);
15980        __tmp.put_f32_le(self.xmag);
15981        __tmp.put_f32_le(self.ymag);
15982        __tmp.put_f32_le(self.zmag);
15983        __tmp.put_f32_le(self.abs_pressure);
15984        __tmp.put_f32_le(self.diff_pressure);
15985        __tmp.put_f32_le(self.pressure_alt);
15986        __tmp.put_f32_le(self.temperature);
15987        __tmp.put_u16_le(self.fields_updated.bits());
15988        if matches!(version, MavlinkVersion::V2) {
15989            __tmp.put_u8(self.id);
15990            let len = __tmp.len();
15991            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15992        } else {
15993            __tmp.len()
15994        }
15995    }
15996}
15997#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15998#[doc = "Message appropriate for high latency connections like Iridium."]
15999#[doc = ""]
16000#[doc = "ID: 234"]
16001#[derive(Debug, Clone, PartialEq)]
16002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16004#[cfg_attr(feature = "ts", derive(TS))]
16005#[cfg_attr(feature = "ts", ts(export))]
16006pub struct HIGH_LATENCY_DATA {
16007    #[doc = "A bitfield for use for autopilot-specific flags."]
16008    pub custom_mode: u32,
16009    #[doc = "Latitude"]
16010    pub latitude: i32,
16011    #[doc = "Longitude"]
16012    pub longitude: i32,
16013    #[doc = "roll"]
16014    pub roll: i16,
16015    #[doc = "pitch"]
16016    pub pitch: i16,
16017    #[doc = "heading"]
16018    pub heading: u16,
16019    #[doc = "heading setpoint"]
16020    pub heading_sp: i16,
16021    #[doc = "Altitude above mean sea level"]
16022    pub altitude_amsl: i16,
16023    #[doc = "Altitude setpoint relative to the home position"]
16024    pub altitude_sp: i16,
16025    #[doc = "distance to target"]
16026    pub wp_distance: u16,
16027    #[doc = "Bitmap of enabled system modes."]
16028    pub base_mode: MavModeFlag,
16029    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16030    pub landed_state: MavLandedState,
16031    #[doc = "throttle (percentage)"]
16032    pub throttle: i8,
16033    #[doc = "airspeed"]
16034    pub airspeed: u8,
16035    #[doc = "airspeed setpoint"]
16036    pub airspeed_sp: u8,
16037    #[doc = "groundspeed"]
16038    pub groundspeed: u8,
16039    #[doc = "climb rate"]
16040    pub climb_rate: i8,
16041    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16042    pub gps_nsat: u8,
16043    #[doc = "GPS Fix type."]
16044    pub gps_fix_type: GpsFixType,
16045    #[doc = "Remaining battery (percentage)"]
16046    pub battery_remaining: u8,
16047    #[doc = "Autopilot temperature (degrees C)"]
16048    pub temperature: i8,
16049    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16050    pub temperature_air: i8,
16051    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16052    pub failsafe: u8,
16053    #[doc = "current waypoint number"]
16054    pub wp_num: u8,
16055}
16056impl HIGH_LATENCY_DATA {
16057    pub const ENCODED_LEN: usize = 40usize;
16058    pub const DEFAULT: Self = Self {
16059        custom_mode: 0_u32,
16060        latitude: 0_i32,
16061        longitude: 0_i32,
16062        roll: 0_i16,
16063        pitch: 0_i16,
16064        heading: 0_u16,
16065        heading_sp: 0_i16,
16066        altitude_amsl: 0_i16,
16067        altitude_sp: 0_i16,
16068        wp_distance: 0_u16,
16069        base_mode: MavModeFlag::DEFAULT,
16070        landed_state: MavLandedState::DEFAULT,
16071        throttle: 0_i8,
16072        airspeed: 0_u8,
16073        airspeed_sp: 0_u8,
16074        groundspeed: 0_u8,
16075        climb_rate: 0_i8,
16076        gps_nsat: 0_u8,
16077        gps_fix_type: GpsFixType::DEFAULT,
16078        battery_remaining: 0_u8,
16079        temperature: 0_i8,
16080        temperature_air: 0_i8,
16081        failsafe: 0_u8,
16082        wp_num: 0_u8,
16083    };
16084    #[cfg(feature = "arbitrary")]
16085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16086        use arbitrary::{Arbitrary, Unstructured};
16087        let mut buf = [0u8; 1024];
16088        rng.fill_bytes(&mut buf);
16089        let mut unstructured = Unstructured::new(&buf);
16090        Self::arbitrary(&mut unstructured).unwrap_or_default()
16091    }
16092}
16093impl Default for HIGH_LATENCY_DATA {
16094    fn default() -> Self {
16095        Self::DEFAULT.clone()
16096    }
16097}
16098impl MessageData for HIGH_LATENCY_DATA {
16099    type Message = MavMessage;
16100    const ID: u32 = 234u32;
16101    const NAME: &'static str = "HIGH_LATENCY";
16102    const EXTRA_CRC: u8 = 150u8;
16103    const ENCODED_LEN: usize = 40usize;
16104    fn deser(
16105        _version: MavlinkVersion,
16106        __input: &[u8],
16107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16108        let avail_len = __input.len();
16109        let mut payload_buf = [0; Self::ENCODED_LEN];
16110        let mut buf = if avail_len < Self::ENCODED_LEN {
16111            payload_buf[0..avail_len].copy_from_slice(__input);
16112            Bytes::new(&payload_buf)
16113        } else {
16114            Bytes::new(__input)
16115        };
16116        let mut __struct = Self::default();
16117        __struct.custom_mode = buf.get_u32_le();
16118        __struct.latitude = buf.get_i32_le();
16119        __struct.longitude = buf.get_i32_le();
16120        __struct.roll = buf.get_i16_le();
16121        __struct.pitch = buf.get_i16_le();
16122        __struct.heading = buf.get_u16_le();
16123        __struct.heading_sp = buf.get_i16_le();
16124        __struct.altitude_amsl = buf.get_i16_le();
16125        __struct.altitude_sp = buf.get_i16_le();
16126        __struct.wp_distance = buf.get_u16_le();
16127        let tmp = buf.get_u8();
16128        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16129            ::mavlink_core::error::ParserError::InvalidFlag {
16130                flag_type: "MavModeFlag",
16131                value: tmp as u32,
16132            },
16133        )?;
16134        let tmp = buf.get_u8();
16135        __struct.landed_state =
16136            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16137                enum_type: "MavLandedState",
16138                value: tmp as u32,
16139            })?;
16140        __struct.throttle = buf.get_i8();
16141        __struct.airspeed = buf.get_u8();
16142        __struct.airspeed_sp = buf.get_u8();
16143        __struct.groundspeed = buf.get_u8();
16144        __struct.climb_rate = buf.get_i8();
16145        __struct.gps_nsat = buf.get_u8();
16146        let tmp = buf.get_u8();
16147        __struct.gps_fix_type =
16148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16149                enum_type: "GpsFixType",
16150                value: tmp as u32,
16151            })?;
16152        __struct.battery_remaining = buf.get_u8();
16153        __struct.temperature = buf.get_i8();
16154        __struct.temperature_air = buf.get_i8();
16155        __struct.failsafe = buf.get_u8();
16156        __struct.wp_num = buf.get_u8();
16157        Ok(__struct)
16158    }
16159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16160        let mut __tmp = BytesMut::new(bytes);
16161        #[allow(clippy::absurd_extreme_comparisons)]
16162        #[allow(unused_comparisons)]
16163        if __tmp.remaining() < Self::ENCODED_LEN {
16164            panic!(
16165                "buffer is too small (need {} bytes, but got {})",
16166                Self::ENCODED_LEN,
16167                __tmp.remaining(),
16168            )
16169        }
16170        __tmp.put_u32_le(self.custom_mode);
16171        __tmp.put_i32_le(self.latitude);
16172        __tmp.put_i32_le(self.longitude);
16173        __tmp.put_i16_le(self.roll);
16174        __tmp.put_i16_le(self.pitch);
16175        __tmp.put_u16_le(self.heading);
16176        __tmp.put_i16_le(self.heading_sp);
16177        __tmp.put_i16_le(self.altitude_amsl);
16178        __tmp.put_i16_le(self.altitude_sp);
16179        __tmp.put_u16_le(self.wp_distance);
16180        __tmp.put_u8(self.base_mode.bits());
16181        __tmp.put_u8(self.landed_state as u8);
16182        __tmp.put_i8(self.throttle);
16183        __tmp.put_u8(self.airspeed);
16184        __tmp.put_u8(self.airspeed_sp);
16185        __tmp.put_u8(self.groundspeed);
16186        __tmp.put_i8(self.climb_rate);
16187        __tmp.put_u8(self.gps_nsat);
16188        __tmp.put_u8(self.gps_fix_type as u8);
16189        __tmp.put_u8(self.battery_remaining);
16190        __tmp.put_i8(self.temperature);
16191        __tmp.put_i8(self.temperature_air);
16192        __tmp.put_u8(self.failsafe);
16193        __tmp.put_u8(self.wp_num);
16194        if matches!(version, MavlinkVersion::V2) {
16195            let len = __tmp.len();
16196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16197        } else {
16198            __tmp.len()
16199        }
16200    }
16201}
16202#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16203#[doc = ""]
16204#[doc = "ID: 235"]
16205#[derive(Debug, Clone, PartialEq)]
16206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16208#[cfg_attr(feature = "ts", derive(TS))]
16209#[cfg_attr(feature = "ts", ts(export))]
16210pub struct HIGH_LATENCY2_DATA {
16211    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16212    pub timestamp: u32,
16213    #[doc = "Latitude"]
16214    pub latitude: i32,
16215    #[doc = "Longitude"]
16216    pub longitude: i32,
16217    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16218    pub custom_mode: u16,
16219    #[doc = "Altitude above mean sea level"]
16220    pub altitude: i16,
16221    #[doc = "Altitude setpoint"]
16222    pub target_altitude: i16,
16223    #[doc = "Distance to target waypoint or position"]
16224    pub target_distance: u16,
16225    #[doc = "Current waypoint number"]
16226    pub wp_num: u16,
16227    #[doc = "Bitmap of failure flags."]
16228    pub failure_flags: HlFailureFlag,
16229    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16230    pub mavtype: MavType,
16231    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16232    pub autopilot: MavAutopilot,
16233    #[doc = "Heading"]
16234    pub heading: u8,
16235    #[doc = "Heading setpoint"]
16236    pub target_heading: u8,
16237    #[doc = "Throttle"]
16238    pub throttle: u8,
16239    #[doc = "Airspeed"]
16240    pub airspeed: u8,
16241    #[doc = "Airspeed setpoint"]
16242    pub airspeed_sp: u8,
16243    #[doc = "Groundspeed"]
16244    pub groundspeed: u8,
16245    #[doc = "Windspeed"]
16246    pub windspeed: u8,
16247    #[doc = "Wind heading"]
16248    pub wind_heading: u8,
16249    #[doc = "Maximum error horizontal position since last message"]
16250    pub eph: u8,
16251    #[doc = "Maximum error vertical position since last message"]
16252    pub epv: u8,
16253    #[doc = "Air temperature"]
16254    pub temperature_air: i8,
16255    #[doc = "Maximum climb rate magnitude since last message"]
16256    pub climb_rate: i8,
16257    #[doc = "Battery level (-1 if field not provided)."]
16258    pub battery: i8,
16259    #[doc = "Field for custom payload."]
16260    pub custom0: i8,
16261    #[doc = "Field for custom payload."]
16262    pub custom1: i8,
16263    #[doc = "Field for custom payload."]
16264    pub custom2: i8,
16265}
16266impl HIGH_LATENCY2_DATA {
16267    pub const ENCODED_LEN: usize = 42usize;
16268    pub const DEFAULT: Self = Self {
16269        timestamp: 0_u32,
16270        latitude: 0_i32,
16271        longitude: 0_i32,
16272        custom_mode: 0_u16,
16273        altitude: 0_i16,
16274        target_altitude: 0_i16,
16275        target_distance: 0_u16,
16276        wp_num: 0_u16,
16277        failure_flags: HlFailureFlag::DEFAULT,
16278        mavtype: MavType::DEFAULT,
16279        autopilot: MavAutopilot::DEFAULT,
16280        heading: 0_u8,
16281        target_heading: 0_u8,
16282        throttle: 0_u8,
16283        airspeed: 0_u8,
16284        airspeed_sp: 0_u8,
16285        groundspeed: 0_u8,
16286        windspeed: 0_u8,
16287        wind_heading: 0_u8,
16288        eph: 0_u8,
16289        epv: 0_u8,
16290        temperature_air: 0_i8,
16291        climb_rate: 0_i8,
16292        battery: 0_i8,
16293        custom0: 0_i8,
16294        custom1: 0_i8,
16295        custom2: 0_i8,
16296    };
16297    #[cfg(feature = "arbitrary")]
16298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16299        use arbitrary::{Arbitrary, Unstructured};
16300        let mut buf = [0u8; 1024];
16301        rng.fill_bytes(&mut buf);
16302        let mut unstructured = Unstructured::new(&buf);
16303        Self::arbitrary(&mut unstructured).unwrap_or_default()
16304    }
16305}
16306impl Default for HIGH_LATENCY2_DATA {
16307    fn default() -> Self {
16308        Self::DEFAULT.clone()
16309    }
16310}
16311impl MessageData for HIGH_LATENCY2_DATA {
16312    type Message = MavMessage;
16313    const ID: u32 = 235u32;
16314    const NAME: &'static str = "HIGH_LATENCY2";
16315    const EXTRA_CRC: u8 = 179u8;
16316    const ENCODED_LEN: usize = 42usize;
16317    fn deser(
16318        _version: MavlinkVersion,
16319        __input: &[u8],
16320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16321        let avail_len = __input.len();
16322        let mut payload_buf = [0; Self::ENCODED_LEN];
16323        let mut buf = if avail_len < Self::ENCODED_LEN {
16324            payload_buf[0..avail_len].copy_from_slice(__input);
16325            Bytes::new(&payload_buf)
16326        } else {
16327            Bytes::new(__input)
16328        };
16329        let mut __struct = Self::default();
16330        __struct.timestamp = buf.get_u32_le();
16331        __struct.latitude = buf.get_i32_le();
16332        __struct.longitude = buf.get_i32_le();
16333        __struct.custom_mode = buf.get_u16_le();
16334        __struct.altitude = buf.get_i16_le();
16335        __struct.target_altitude = buf.get_i16_le();
16336        __struct.target_distance = buf.get_u16_le();
16337        __struct.wp_num = buf.get_u16_le();
16338        let tmp = buf.get_u16_le();
16339        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
16340            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16341                flag_type: "HlFailureFlag",
16342                value: tmp as u32,
16343            })?;
16344        let tmp = buf.get_u8();
16345        __struct.mavtype =
16346            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16347                enum_type: "MavType",
16348                value: tmp as u32,
16349            })?;
16350        let tmp = buf.get_u8();
16351        __struct.autopilot =
16352            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16353                enum_type: "MavAutopilot",
16354                value: tmp as u32,
16355            })?;
16356        __struct.heading = buf.get_u8();
16357        __struct.target_heading = buf.get_u8();
16358        __struct.throttle = buf.get_u8();
16359        __struct.airspeed = buf.get_u8();
16360        __struct.airspeed_sp = buf.get_u8();
16361        __struct.groundspeed = buf.get_u8();
16362        __struct.windspeed = buf.get_u8();
16363        __struct.wind_heading = buf.get_u8();
16364        __struct.eph = buf.get_u8();
16365        __struct.epv = buf.get_u8();
16366        __struct.temperature_air = buf.get_i8();
16367        __struct.climb_rate = buf.get_i8();
16368        __struct.battery = buf.get_i8();
16369        __struct.custom0 = buf.get_i8();
16370        __struct.custom1 = buf.get_i8();
16371        __struct.custom2 = buf.get_i8();
16372        Ok(__struct)
16373    }
16374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16375        let mut __tmp = BytesMut::new(bytes);
16376        #[allow(clippy::absurd_extreme_comparisons)]
16377        #[allow(unused_comparisons)]
16378        if __tmp.remaining() < Self::ENCODED_LEN {
16379            panic!(
16380                "buffer is too small (need {} bytes, but got {})",
16381                Self::ENCODED_LEN,
16382                __tmp.remaining(),
16383            )
16384        }
16385        __tmp.put_u32_le(self.timestamp);
16386        __tmp.put_i32_le(self.latitude);
16387        __tmp.put_i32_le(self.longitude);
16388        __tmp.put_u16_le(self.custom_mode);
16389        __tmp.put_i16_le(self.altitude);
16390        __tmp.put_i16_le(self.target_altitude);
16391        __tmp.put_u16_le(self.target_distance);
16392        __tmp.put_u16_le(self.wp_num);
16393        __tmp.put_u16_le(self.failure_flags.bits());
16394        __tmp.put_u8(self.mavtype as u8);
16395        __tmp.put_u8(self.autopilot as u8);
16396        __tmp.put_u8(self.heading);
16397        __tmp.put_u8(self.target_heading);
16398        __tmp.put_u8(self.throttle);
16399        __tmp.put_u8(self.airspeed);
16400        __tmp.put_u8(self.airspeed_sp);
16401        __tmp.put_u8(self.groundspeed);
16402        __tmp.put_u8(self.windspeed);
16403        __tmp.put_u8(self.wind_heading);
16404        __tmp.put_u8(self.eph);
16405        __tmp.put_u8(self.epv);
16406        __tmp.put_i8(self.temperature_air);
16407        __tmp.put_i8(self.climb_rate);
16408        __tmp.put_i8(self.battery);
16409        __tmp.put_i8(self.custom0);
16410        __tmp.put_i8(self.custom1);
16411        __tmp.put_i8(self.custom2);
16412        if matches!(version, MavlinkVersion::V2) {
16413            let len = __tmp.len();
16414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16415        } else {
16416            __tmp.len()
16417        }
16418    }
16419}
16420#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16421#[doc = ""]
16422#[doc = "ID: 93"]
16423#[derive(Debug, Clone, PartialEq)]
16424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16426#[cfg_attr(feature = "ts", derive(TS))]
16427#[cfg_attr(feature = "ts", ts(export))]
16428pub struct HIL_ACTUATOR_CONTROLS_DATA {
16429    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16430    pub time_usec: u64,
16431    #[doc = "Flags bitmask."]
16432    pub flags: HilActuatorControlsFlags,
16433    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16434    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16435    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16436    pub controls: [f32; 16],
16437    #[doc = "System mode. Includes arming state."]
16438    pub mode: MavModeFlag,
16439}
16440impl HIL_ACTUATOR_CONTROLS_DATA {
16441    pub const ENCODED_LEN: usize = 81usize;
16442    pub const DEFAULT: Self = Self {
16443        time_usec: 0_u64,
16444        flags: HilActuatorControlsFlags::DEFAULT,
16445        controls: [0.0_f32; 16usize],
16446        mode: MavModeFlag::DEFAULT,
16447    };
16448    #[cfg(feature = "arbitrary")]
16449    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16450        use arbitrary::{Arbitrary, Unstructured};
16451        let mut buf = [0u8; 1024];
16452        rng.fill_bytes(&mut buf);
16453        let mut unstructured = Unstructured::new(&buf);
16454        Self::arbitrary(&mut unstructured).unwrap_or_default()
16455    }
16456}
16457impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16458    fn default() -> Self {
16459        Self::DEFAULT.clone()
16460    }
16461}
16462impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16463    type Message = MavMessage;
16464    const ID: u32 = 93u32;
16465    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16466    const EXTRA_CRC: u8 = 47u8;
16467    const ENCODED_LEN: usize = 81usize;
16468    fn deser(
16469        _version: MavlinkVersion,
16470        __input: &[u8],
16471    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16472        let avail_len = __input.len();
16473        let mut payload_buf = [0; Self::ENCODED_LEN];
16474        let mut buf = if avail_len < Self::ENCODED_LEN {
16475            payload_buf[0..avail_len].copy_from_slice(__input);
16476            Bytes::new(&payload_buf)
16477        } else {
16478            Bytes::new(__input)
16479        };
16480        let mut __struct = Self::default();
16481        __struct.time_usec = buf.get_u64_le();
16482        let tmp = buf.get_u64_le();
16483        __struct.flags =
16484            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16485                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16486                    flag_type: "HilActuatorControlsFlags",
16487                    value: tmp as u32,
16488                })?;
16489        for v in &mut __struct.controls {
16490            let val = buf.get_f32_le();
16491            *v = val;
16492        }
16493        let tmp = buf.get_u8();
16494        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16495            ::mavlink_core::error::ParserError::InvalidFlag {
16496                flag_type: "MavModeFlag",
16497                value: tmp as u32,
16498            },
16499        )?;
16500        Ok(__struct)
16501    }
16502    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16503        let mut __tmp = BytesMut::new(bytes);
16504        #[allow(clippy::absurd_extreme_comparisons)]
16505        #[allow(unused_comparisons)]
16506        if __tmp.remaining() < Self::ENCODED_LEN {
16507            panic!(
16508                "buffer is too small (need {} bytes, but got {})",
16509                Self::ENCODED_LEN,
16510                __tmp.remaining(),
16511            )
16512        }
16513        __tmp.put_u64_le(self.time_usec);
16514        __tmp.put_u64_le(self.flags.bits());
16515        for val in &self.controls {
16516            __tmp.put_f32_le(*val);
16517        }
16518        __tmp.put_u8(self.mode.bits());
16519        if matches!(version, MavlinkVersion::V2) {
16520            let len = __tmp.len();
16521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16522        } else {
16523            __tmp.len()
16524        }
16525    }
16526}
16527#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16528#[doc = ""]
16529#[doc = "ID: 91"]
16530#[derive(Debug, Clone, PartialEq)]
16531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16533#[cfg_attr(feature = "ts", derive(TS))]
16534#[cfg_attr(feature = "ts", ts(export))]
16535pub struct HIL_CONTROLS_DATA {
16536    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16537    pub time_usec: u64,
16538    #[doc = "Control output -1 .. 1"]
16539    pub roll_ailerons: f32,
16540    #[doc = "Control output -1 .. 1"]
16541    pub pitch_elevator: f32,
16542    #[doc = "Control output -1 .. 1"]
16543    pub yaw_rudder: f32,
16544    #[doc = "Throttle 0 .. 1"]
16545    pub throttle: f32,
16546    #[doc = "Aux 1, -1 .. 1"]
16547    pub aux1: f32,
16548    #[doc = "Aux 2, -1 .. 1"]
16549    pub aux2: f32,
16550    #[doc = "Aux 3, -1 .. 1"]
16551    pub aux3: f32,
16552    #[doc = "Aux 4, -1 .. 1"]
16553    pub aux4: f32,
16554    #[doc = "System mode."]
16555    pub mode: MavMode,
16556    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16557    pub nav_mode: u8,
16558}
16559impl HIL_CONTROLS_DATA {
16560    pub const ENCODED_LEN: usize = 42usize;
16561    pub const DEFAULT: Self = Self {
16562        time_usec: 0_u64,
16563        roll_ailerons: 0.0_f32,
16564        pitch_elevator: 0.0_f32,
16565        yaw_rudder: 0.0_f32,
16566        throttle: 0.0_f32,
16567        aux1: 0.0_f32,
16568        aux2: 0.0_f32,
16569        aux3: 0.0_f32,
16570        aux4: 0.0_f32,
16571        mode: MavMode::DEFAULT,
16572        nav_mode: 0_u8,
16573    };
16574    #[cfg(feature = "arbitrary")]
16575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16576        use arbitrary::{Arbitrary, Unstructured};
16577        let mut buf = [0u8; 1024];
16578        rng.fill_bytes(&mut buf);
16579        let mut unstructured = Unstructured::new(&buf);
16580        Self::arbitrary(&mut unstructured).unwrap_or_default()
16581    }
16582}
16583impl Default for HIL_CONTROLS_DATA {
16584    fn default() -> Self {
16585        Self::DEFAULT.clone()
16586    }
16587}
16588impl MessageData for HIL_CONTROLS_DATA {
16589    type Message = MavMessage;
16590    const ID: u32 = 91u32;
16591    const NAME: &'static str = "HIL_CONTROLS";
16592    const EXTRA_CRC: u8 = 63u8;
16593    const ENCODED_LEN: usize = 42usize;
16594    fn deser(
16595        _version: MavlinkVersion,
16596        __input: &[u8],
16597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16598        let avail_len = __input.len();
16599        let mut payload_buf = [0; Self::ENCODED_LEN];
16600        let mut buf = if avail_len < Self::ENCODED_LEN {
16601            payload_buf[0..avail_len].copy_from_slice(__input);
16602            Bytes::new(&payload_buf)
16603        } else {
16604            Bytes::new(__input)
16605        };
16606        let mut __struct = Self::default();
16607        __struct.time_usec = buf.get_u64_le();
16608        __struct.roll_ailerons = buf.get_f32_le();
16609        __struct.pitch_elevator = buf.get_f32_le();
16610        __struct.yaw_rudder = buf.get_f32_le();
16611        __struct.throttle = buf.get_f32_le();
16612        __struct.aux1 = buf.get_f32_le();
16613        __struct.aux2 = buf.get_f32_le();
16614        __struct.aux3 = buf.get_f32_le();
16615        __struct.aux4 = buf.get_f32_le();
16616        let tmp = buf.get_u8();
16617        __struct.mode =
16618            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16619                enum_type: "MavMode",
16620                value: tmp as u32,
16621            })?;
16622        __struct.nav_mode = buf.get_u8();
16623        Ok(__struct)
16624    }
16625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16626        let mut __tmp = BytesMut::new(bytes);
16627        #[allow(clippy::absurd_extreme_comparisons)]
16628        #[allow(unused_comparisons)]
16629        if __tmp.remaining() < Self::ENCODED_LEN {
16630            panic!(
16631                "buffer is too small (need {} bytes, but got {})",
16632                Self::ENCODED_LEN,
16633                __tmp.remaining(),
16634            )
16635        }
16636        __tmp.put_u64_le(self.time_usec);
16637        __tmp.put_f32_le(self.roll_ailerons);
16638        __tmp.put_f32_le(self.pitch_elevator);
16639        __tmp.put_f32_le(self.yaw_rudder);
16640        __tmp.put_f32_le(self.throttle);
16641        __tmp.put_f32_le(self.aux1);
16642        __tmp.put_f32_le(self.aux2);
16643        __tmp.put_f32_le(self.aux3);
16644        __tmp.put_f32_le(self.aux4);
16645        __tmp.put_u8(self.mode as u8);
16646        __tmp.put_u8(self.nav_mode);
16647        if matches!(version, MavlinkVersion::V2) {
16648            let len = __tmp.len();
16649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16650        } else {
16651            __tmp.len()
16652        }
16653    }
16654}
16655#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16656#[doc = ""]
16657#[doc = "ID: 113"]
16658#[derive(Debug, Clone, PartialEq)]
16659#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16661#[cfg_attr(feature = "ts", derive(TS))]
16662#[cfg_attr(feature = "ts", ts(export))]
16663pub struct HIL_GPS_DATA {
16664    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16665    pub time_usec: u64,
16666    #[doc = "Latitude (WGS84)"]
16667    pub lat: i32,
16668    #[doc = "Longitude (WGS84)"]
16669    pub lon: i32,
16670    #[doc = "Altitude (MSL). Positive for up."]
16671    pub alt: i32,
16672    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16673    pub eph: u16,
16674    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16675    pub epv: u16,
16676    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16677    pub vel: u16,
16678    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16679    pub vn: i16,
16680    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16681    pub ve: i16,
16682    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16683    pub vd: i16,
16684    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16685    pub cog: u16,
16686    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16687    pub fix_type: u8,
16688    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16689    pub satellites_visible: u8,
16690    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16692    pub id: u8,
16693    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16695    pub yaw: u16,
16696}
16697impl HIL_GPS_DATA {
16698    pub const ENCODED_LEN: usize = 39usize;
16699    pub const DEFAULT: Self = Self {
16700        time_usec: 0_u64,
16701        lat: 0_i32,
16702        lon: 0_i32,
16703        alt: 0_i32,
16704        eph: 0_u16,
16705        epv: 0_u16,
16706        vel: 0_u16,
16707        vn: 0_i16,
16708        ve: 0_i16,
16709        vd: 0_i16,
16710        cog: 0_u16,
16711        fix_type: 0_u8,
16712        satellites_visible: 0_u8,
16713        id: 0_u8,
16714        yaw: 0_u16,
16715    };
16716    #[cfg(feature = "arbitrary")]
16717    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16718        use arbitrary::{Arbitrary, Unstructured};
16719        let mut buf = [0u8; 1024];
16720        rng.fill_bytes(&mut buf);
16721        let mut unstructured = Unstructured::new(&buf);
16722        Self::arbitrary(&mut unstructured).unwrap_or_default()
16723    }
16724}
16725impl Default for HIL_GPS_DATA {
16726    fn default() -> Self {
16727        Self::DEFAULT.clone()
16728    }
16729}
16730impl MessageData for HIL_GPS_DATA {
16731    type Message = MavMessage;
16732    const ID: u32 = 113u32;
16733    const NAME: &'static str = "HIL_GPS";
16734    const EXTRA_CRC: u8 = 124u8;
16735    const ENCODED_LEN: usize = 39usize;
16736    fn deser(
16737        _version: MavlinkVersion,
16738        __input: &[u8],
16739    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16740        let avail_len = __input.len();
16741        let mut payload_buf = [0; Self::ENCODED_LEN];
16742        let mut buf = if avail_len < Self::ENCODED_LEN {
16743            payload_buf[0..avail_len].copy_from_slice(__input);
16744            Bytes::new(&payload_buf)
16745        } else {
16746            Bytes::new(__input)
16747        };
16748        let mut __struct = Self::default();
16749        __struct.time_usec = buf.get_u64_le();
16750        __struct.lat = buf.get_i32_le();
16751        __struct.lon = buf.get_i32_le();
16752        __struct.alt = buf.get_i32_le();
16753        __struct.eph = buf.get_u16_le();
16754        __struct.epv = buf.get_u16_le();
16755        __struct.vel = buf.get_u16_le();
16756        __struct.vn = buf.get_i16_le();
16757        __struct.ve = buf.get_i16_le();
16758        __struct.vd = buf.get_i16_le();
16759        __struct.cog = buf.get_u16_le();
16760        __struct.fix_type = buf.get_u8();
16761        __struct.satellites_visible = buf.get_u8();
16762        __struct.id = buf.get_u8();
16763        __struct.yaw = buf.get_u16_le();
16764        Ok(__struct)
16765    }
16766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16767        let mut __tmp = BytesMut::new(bytes);
16768        #[allow(clippy::absurd_extreme_comparisons)]
16769        #[allow(unused_comparisons)]
16770        if __tmp.remaining() < Self::ENCODED_LEN {
16771            panic!(
16772                "buffer is too small (need {} bytes, but got {})",
16773                Self::ENCODED_LEN,
16774                __tmp.remaining(),
16775            )
16776        }
16777        __tmp.put_u64_le(self.time_usec);
16778        __tmp.put_i32_le(self.lat);
16779        __tmp.put_i32_le(self.lon);
16780        __tmp.put_i32_le(self.alt);
16781        __tmp.put_u16_le(self.eph);
16782        __tmp.put_u16_le(self.epv);
16783        __tmp.put_u16_le(self.vel);
16784        __tmp.put_i16_le(self.vn);
16785        __tmp.put_i16_le(self.ve);
16786        __tmp.put_i16_le(self.vd);
16787        __tmp.put_u16_le(self.cog);
16788        __tmp.put_u8(self.fix_type);
16789        __tmp.put_u8(self.satellites_visible);
16790        if matches!(version, MavlinkVersion::V2) {
16791            __tmp.put_u8(self.id);
16792            __tmp.put_u16_le(self.yaw);
16793            let len = __tmp.len();
16794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16795        } else {
16796            __tmp.len()
16797        }
16798    }
16799}
16800#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16801#[doc = ""]
16802#[doc = "ID: 114"]
16803#[derive(Debug, Clone, PartialEq)]
16804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16806#[cfg_attr(feature = "ts", derive(TS))]
16807#[cfg_attr(feature = "ts", ts(export))]
16808pub struct HIL_OPTICAL_FLOW_DATA {
16809    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16810    pub time_usec: u64,
16811    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16812    pub integration_time_us: u32,
16813    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16814    pub integrated_x: f32,
16815    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16816    pub integrated_y: f32,
16817    #[doc = "RH rotation around X axis"]
16818    pub integrated_xgyro: f32,
16819    #[doc = "RH rotation around Y axis"]
16820    pub integrated_ygyro: f32,
16821    #[doc = "RH rotation around Z axis"]
16822    pub integrated_zgyro: f32,
16823    #[doc = "Time since the distance was sampled."]
16824    pub time_delta_distance_us: u32,
16825    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16826    pub distance: f32,
16827    #[doc = "Temperature"]
16828    pub temperature: i16,
16829    #[doc = "Sensor ID"]
16830    pub sensor_id: u8,
16831    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16832    pub quality: u8,
16833}
16834impl HIL_OPTICAL_FLOW_DATA {
16835    pub const ENCODED_LEN: usize = 44usize;
16836    pub const DEFAULT: Self = Self {
16837        time_usec: 0_u64,
16838        integration_time_us: 0_u32,
16839        integrated_x: 0.0_f32,
16840        integrated_y: 0.0_f32,
16841        integrated_xgyro: 0.0_f32,
16842        integrated_ygyro: 0.0_f32,
16843        integrated_zgyro: 0.0_f32,
16844        time_delta_distance_us: 0_u32,
16845        distance: 0.0_f32,
16846        temperature: 0_i16,
16847        sensor_id: 0_u8,
16848        quality: 0_u8,
16849    };
16850    #[cfg(feature = "arbitrary")]
16851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16852        use arbitrary::{Arbitrary, Unstructured};
16853        let mut buf = [0u8; 1024];
16854        rng.fill_bytes(&mut buf);
16855        let mut unstructured = Unstructured::new(&buf);
16856        Self::arbitrary(&mut unstructured).unwrap_or_default()
16857    }
16858}
16859impl Default for HIL_OPTICAL_FLOW_DATA {
16860    fn default() -> Self {
16861        Self::DEFAULT.clone()
16862    }
16863}
16864impl MessageData for HIL_OPTICAL_FLOW_DATA {
16865    type Message = MavMessage;
16866    const ID: u32 = 114u32;
16867    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16868    const EXTRA_CRC: u8 = 237u8;
16869    const ENCODED_LEN: usize = 44usize;
16870    fn deser(
16871        _version: MavlinkVersion,
16872        __input: &[u8],
16873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16874        let avail_len = __input.len();
16875        let mut payload_buf = [0; Self::ENCODED_LEN];
16876        let mut buf = if avail_len < Self::ENCODED_LEN {
16877            payload_buf[0..avail_len].copy_from_slice(__input);
16878            Bytes::new(&payload_buf)
16879        } else {
16880            Bytes::new(__input)
16881        };
16882        let mut __struct = Self::default();
16883        __struct.time_usec = buf.get_u64_le();
16884        __struct.integration_time_us = buf.get_u32_le();
16885        __struct.integrated_x = buf.get_f32_le();
16886        __struct.integrated_y = buf.get_f32_le();
16887        __struct.integrated_xgyro = buf.get_f32_le();
16888        __struct.integrated_ygyro = buf.get_f32_le();
16889        __struct.integrated_zgyro = buf.get_f32_le();
16890        __struct.time_delta_distance_us = buf.get_u32_le();
16891        __struct.distance = buf.get_f32_le();
16892        __struct.temperature = buf.get_i16_le();
16893        __struct.sensor_id = buf.get_u8();
16894        __struct.quality = buf.get_u8();
16895        Ok(__struct)
16896    }
16897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16898        let mut __tmp = BytesMut::new(bytes);
16899        #[allow(clippy::absurd_extreme_comparisons)]
16900        #[allow(unused_comparisons)]
16901        if __tmp.remaining() < Self::ENCODED_LEN {
16902            panic!(
16903                "buffer is too small (need {} bytes, but got {})",
16904                Self::ENCODED_LEN,
16905                __tmp.remaining(),
16906            )
16907        }
16908        __tmp.put_u64_le(self.time_usec);
16909        __tmp.put_u32_le(self.integration_time_us);
16910        __tmp.put_f32_le(self.integrated_x);
16911        __tmp.put_f32_le(self.integrated_y);
16912        __tmp.put_f32_le(self.integrated_xgyro);
16913        __tmp.put_f32_le(self.integrated_ygyro);
16914        __tmp.put_f32_le(self.integrated_zgyro);
16915        __tmp.put_u32_le(self.time_delta_distance_us);
16916        __tmp.put_f32_le(self.distance);
16917        __tmp.put_i16_le(self.temperature);
16918        __tmp.put_u8(self.sensor_id);
16919        __tmp.put_u8(self.quality);
16920        if matches!(version, MavlinkVersion::V2) {
16921            let len = __tmp.len();
16922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16923        } else {
16924            __tmp.len()
16925        }
16926    }
16927}
16928#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16929#[doc = ""]
16930#[doc = "ID: 92"]
16931#[derive(Debug, Clone, PartialEq)]
16932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16934#[cfg_attr(feature = "ts", derive(TS))]
16935#[cfg_attr(feature = "ts", ts(export))]
16936pub struct HIL_RC_INPUTS_RAW_DATA {
16937    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16938    pub time_usec: u64,
16939    #[doc = "RC channel 1 value"]
16940    pub chan1_raw: u16,
16941    #[doc = "RC channel 2 value"]
16942    pub chan2_raw: u16,
16943    #[doc = "RC channel 3 value"]
16944    pub chan3_raw: u16,
16945    #[doc = "RC channel 4 value"]
16946    pub chan4_raw: u16,
16947    #[doc = "RC channel 5 value"]
16948    pub chan5_raw: u16,
16949    #[doc = "RC channel 6 value"]
16950    pub chan6_raw: u16,
16951    #[doc = "RC channel 7 value"]
16952    pub chan7_raw: u16,
16953    #[doc = "RC channel 8 value"]
16954    pub chan8_raw: u16,
16955    #[doc = "RC channel 9 value"]
16956    pub chan9_raw: u16,
16957    #[doc = "RC channel 10 value"]
16958    pub chan10_raw: u16,
16959    #[doc = "RC channel 11 value"]
16960    pub chan11_raw: u16,
16961    #[doc = "RC channel 12 value"]
16962    pub chan12_raw: u16,
16963    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16964    pub rssi: u8,
16965}
16966impl HIL_RC_INPUTS_RAW_DATA {
16967    pub const ENCODED_LEN: usize = 33usize;
16968    pub const DEFAULT: Self = Self {
16969        time_usec: 0_u64,
16970        chan1_raw: 0_u16,
16971        chan2_raw: 0_u16,
16972        chan3_raw: 0_u16,
16973        chan4_raw: 0_u16,
16974        chan5_raw: 0_u16,
16975        chan6_raw: 0_u16,
16976        chan7_raw: 0_u16,
16977        chan8_raw: 0_u16,
16978        chan9_raw: 0_u16,
16979        chan10_raw: 0_u16,
16980        chan11_raw: 0_u16,
16981        chan12_raw: 0_u16,
16982        rssi: 0_u8,
16983    };
16984    #[cfg(feature = "arbitrary")]
16985    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16986        use arbitrary::{Arbitrary, Unstructured};
16987        let mut buf = [0u8; 1024];
16988        rng.fill_bytes(&mut buf);
16989        let mut unstructured = Unstructured::new(&buf);
16990        Self::arbitrary(&mut unstructured).unwrap_or_default()
16991    }
16992}
16993impl Default for HIL_RC_INPUTS_RAW_DATA {
16994    fn default() -> Self {
16995        Self::DEFAULT.clone()
16996    }
16997}
16998impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16999    type Message = MavMessage;
17000    const ID: u32 = 92u32;
17001    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
17002    const EXTRA_CRC: u8 = 54u8;
17003    const ENCODED_LEN: usize = 33usize;
17004    fn deser(
17005        _version: MavlinkVersion,
17006        __input: &[u8],
17007    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17008        let avail_len = __input.len();
17009        let mut payload_buf = [0; Self::ENCODED_LEN];
17010        let mut buf = if avail_len < Self::ENCODED_LEN {
17011            payload_buf[0..avail_len].copy_from_slice(__input);
17012            Bytes::new(&payload_buf)
17013        } else {
17014            Bytes::new(__input)
17015        };
17016        let mut __struct = Self::default();
17017        __struct.time_usec = buf.get_u64_le();
17018        __struct.chan1_raw = buf.get_u16_le();
17019        __struct.chan2_raw = buf.get_u16_le();
17020        __struct.chan3_raw = buf.get_u16_le();
17021        __struct.chan4_raw = buf.get_u16_le();
17022        __struct.chan5_raw = buf.get_u16_le();
17023        __struct.chan6_raw = buf.get_u16_le();
17024        __struct.chan7_raw = buf.get_u16_le();
17025        __struct.chan8_raw = buf.get_u16_le();
17026        __struct.chan9_raw = buf.get_u16_le();
17027        __struct.chan10_raw = buf.get_u16_le();
17028        __struct.chan11_raw = buf.get_u16_le();
17029        __struct.chan12_raw = buf.get_u16_le();
17030        __struct.rssi = buf.get_u8();
17031        Ok(__struct)
17032    }
17033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17034        let mut __tmp = BytesMut::new(bytes);
17035        #[allow(clippy::absurd_extreme_comparisons)]
17036        #[allow(unused_comparisons)]
17037        if __tmp.remaining() < Self::ENCODED_LEN {
17038            panic!(
17039                "buffer is too small (need {} bytes, but got {})",
17040                Self::ENCODED_LEN,
17041                __tmp.remaining(),
17042            )
17043        }
17044        __tmp.put_u64_le(self.time_usec);
17045        __tmp.put_u16_le(self.chan1_raw);
17046        __tmp.put_u16_le(self.chan2_raw);
17047        __tmp.put_u16_le(self.chan3_raw);
17048        __tmp.put_u16_le(self.chan4_raw);
17049        __tmp.put_u16_le(self.chan5_raw);
17050        __tmp.put_u16_le(self.chan6_raw);
17051        __tmp.put_u16_le(self.chan7_raw);
17052        __tmp.put_u16_le(self.chan8_raw);
17053        __tmp.put_u16_le(self.chan9_raw);
17054        __tmp.put_u16_le(self.chan10_raw);
17055        __tmp.put_u16_le(self.chan11_raw);
17056        __tmp.put_u16_le(self.chan12_raw);
17057        __tmp.put_u8(self.rssi);
17058        if matches!(version, MavlinkVersion::V2) {
17059            let len = __tmp.len();
17060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17061        } else {
17062            __tmp.len()
17063        }
17064    }
17065}
17066#[doc = "The IMU readings in SI units in NED body frame."]
17067#[doc = ""]
17068#[doc = "ID: 107"]
17069#[derive(Debug, Clone, PartialEq)]
17070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17072#[cfg_attr(feature = "ts", derive(TS))]
17073#[cfg_attr(feature = "ts", ts(export))]
17074pub struct HIL_SENSOR_DATA {
17075    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17076    pub time_usec: u64,
17077    #[doc = "X acceleration"]
17078    pub xacc: f32,
17079    #[doc = "Y acceleration"]
17080    pub yacc: f32,
17081    #[doc = "Z acceleration"]
17082    pub zacc: f32,
17083    #[doc = "Angular speed around X axis in body frame"]
17084    pub xgyro: f32,
17085    #[doc = "Angular speed around Y axis in body frame"]
17086    pub ygyro: f32,
17087    #[doc = "Angular speed around Z axis in body frame"]
17088    pub zgyro: f32,
17089    #[doc = "X Magnetic field"]
17090    pub xmag: f32,
17091    #[doc = "Y Magnetic field"]
17092    pub ymag: f32,
17093    #[doc = "Z Magnetic field"]
17094    pub zmag: f32,
17095    #[doc = "Absolute pressure"]
17096    pub abs_pressure: f32,
17097    #[doc = "Differential pressure (airspeed)"]
17098    pub diff_pressure: f32,
17099    #[doc = "Altitude calculated from pressure"]
17100    pub pressure_alt: f32,
17101    #[doc = "Temperature"]
17102    pub temperature: f32,
17103    #[doc = "Bitmap for fields that have updated since last message"]
17104    pub fields_updated: HilSensorUpdatedFlags,
17105    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17106    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17107    pub id: u8,
17108}
17109impl HIL_SENSOR_DATA {
17110    pub const ENCODED_LEN: usize = 65usize;
17111    pub const DEFAULT: Self = Self {
17112        time_usec: 0_u64,
17113        xacc: 0.0_f32,
17114        yacc: 0.0_f32,
17115        zacc: 0.0_f32,
17116        xgyro: 0.0_f32,
17117        ygyro: 0.0_f32,
17118        zgyro: 0.0_f32,
17119        xmag: 0.0_f32,
17120        ymag: 0.0_f32,
17121        zmag: 0.0_f32,
17122        abs_pressure: 0.0_f32,
17123        diff_pressure: 0.0_f32,
17124        pressure_alt: 0.0_f32,
17125        temperature: 0.0_f32,
17126        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17127        id: 0_u8,
17128    };
17129    #[cfg(feature = "arbitrary")]
17130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17131        use arbitrary::{Arbitrary, Unstructured};
17132        let mut buf = [0u8; 1024];
17133        rng.fill_bytes(&mut buf);
17134        let mut unstructured = Unstructured::new(&buf);
17135        Self::arbitrary(&mut unstructured).unwrap_or_default()
17136    }
17137}
17138impl Default for HIL_SENSOR_DATA {
17139    fn default() -> Self {
17140        Self::DEFAULT.clone()
17141    }
17142}
17143impl MessageData for HIL_SENSOR_DATA {
17144    type Message = MavMessage;
17145    const ID: u32 = 107u32;
17146    const NAME: &'static str = "HIL_SENSOR";
17147    const EXTRA_CRC: u8 = 108u8;
17148    const ENCODED_LEN: usize = 65usize;
17149    fn deser(
17150        _version: MavlinkVersion,
17151        __input: &[u8],
17152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17153        let avail_len = __input.len();
17154        let mut payload_buf = [0; Self::ENCODED_LEN];
17155        let mut buf = if avail_len < Self::ENCODED_LEN {
17156            payload_buf[0..avail_len].copy_from_slice(__input);
17157            Bytes::new(&payload_buf)
17158        } else {
17159            Bytes::new(__input)
17160        };
17161        let mut __struct = Self::default();
17162        __struct.time_usec = buf.get_u64_le();
17163        __struct.xacc = buf.get_f32_le();
17164        __struct.yacc = buf.get_f32_le();
17165        __struct.zacc = buf.get_f32_le();
17166        __struct.xgyro = buf.get_f32_le();
17167        __struct.ygyro = buf.get_f32_le();
17168        __struct.zgyro = buf.get_f32_le();
17169        __struct.xmag = buf.get_f32_le();
17170        __struct.ymag = buf.get_f32_le();
17171        __struct.zmag = buf.get_f32_le();
17172        __struct.abs_pressure = buf.get_f32_le();
17173        __struct.diff_pressure = buf.get_f32_le();
17174        __struct.pressure_alt = buf.get_f32_le();
17175        __struct.temperature = buf.get_f32_le();
17176        let tmp = buf.get_u32_le();
17177        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
17178            tmp & HilSensorUpdatedFlags::all().bits(),
17179        )
17180        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17181            flag_type: "HilSensorUpdatedFlags",
17182            value: tmp as u32,
17183        })?;
17184        __struct.id = buf.get_u8();
17185        Ok(__struct)
17186    }
17187    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17188        let mut __tmp = BytesMut::new(bytes);
17189        #[allow(clippy::absurd_extreme_comparisons)]
17190        #[allow(unused_comparisons)]
17191        if __tmp.remaining() < Self::ENCODED_LEN {
17192            panic!(
17193                "buffer is too small (need {} bytes, but got {})",
17194                Self::ENCODED_LEN,
17195                __tmp.remaining(),
17196            )
17197        }
17198        __tmp.put_u64_le(self.time_usec);
17199        __tmp.put_f32_le(self.xacc);
17200        __tmp.put_f32_le(self.yacc);
17201        __tmp.put_f32_le(self.zacc);
17202        __tmp.put_f32_le(self.xgyro);
17203        __tmp.put_f32_le(self.ygyro);
17204        __tmp.put_f32_le(self.zgyro);
17205        __tmp.put_f32_le(self.xmag);
17206        __tmp.put_f32_le(self.ymag);
17207        __tmp.put_f32_le(self.zmag);
17208        __tmp.put_f32_le(self.abs_pressure);
17209        __tmp.put_f32_le(self.diff_pressure);
17210        __tmp.put_f32_le(self.pressure_alt);
17211        __tmp.put_f32_le(self.temperature);
17212        __tmp.put_u32_le(self.fields_updated.bits());
17213        if matches!(version, MavlinkVersion::V2) {
17214            __tmp.put_u8(self.id);
17215            let len = __tmp.len();
17216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17217        } else {
17218            __tmp.len()
17219        }
17220    }
17221}
17222#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17223#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17224#[doc = ""]
17225#[doc = "ID: 90"]
17226#[derive(Debug, Clone, PartialEq)]
17227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17229#[cfg_attr(feature = "ts", derive(TS))]
17230#[cfg_attr(feature = "ts", ts(export))]
17231pub struct HIL_STATE_DATA {
17232    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17233    pub time_usec: u64,
17234    #[doc = "Roll angle"]
17235    pub roll: f32,
17236    #[doc = "Pitch angle"]
17237    pub pitch: f32,
17238    #[doc = "Yaw angle"]
17239    pub yaw: f32,
17240    #[doc = "Body frame roll / phi angular speed"]
17241    pub rollspeed: f32,
17242    #[doc = "Body frame pitch / theta angular speed"]
17243    pub pitchspeed: f32,
17244    #[doc = "Body frame yaw / psi angular speed"]
17245    pub yawspeed: f32,
17246    #[doc = "Latitude"]
17247    pub lat: i32,
17248    #[doc = "Longitude"]
17249    pub lon: i32,
17250    #[doc = "Altitude"]
17251    pub alt: i32,
17252    #[doc = "Ground X Speed (Latitude)"]
17253    pub vx: i16,
17254    #[doc = "Ground Y Speed (Longitude)"]
17255    pub vy: i16,
17256    #[doc = "Ground Z Speed (Altitude)"]
17257    pub vz: i16,
17258    #[doc = "X acceleration"]
17259    pub xacc: i16,
17260    #[doc = "Y acceleration"]
17261    pub yacc: i16,
17262    #[doc = "Z acceleration"]
17263    pub zacc: i16,
17264}
17265impl HIL_STATE_DATA {
17266    pub const ENCODED_LEN: usize = 56usize;
17267    pub const DEFAULT: Self = Self {
17268        time_usec: 0_u64,
17269        roll: 0.0_f32,
17270        pitch: 0.0_f32,
17271        yaw: 0.0_f32,
17272        rollspeed: 0.0_f32,
17273        pitchspeed: 0.0_f32,
17274        yawspeed: 0.0_f32,
17275        lat: 0_i32,
17276        lon: 0_i32,
17277        alt: 0_i32,
17278        vx: 0_i16,
17279        vy: 0_i16,
17280        vz: 0_i16,
17281        xacc: 0_i16,
17282        yacc: 0_i16,
17283        zacc: 0_i16,
17284    };
17285    #[cfg(feature = "arbitrary")]
17286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17287        use arbitrary::{Arbitrary, Unstructured};
17288        let mut buf = [0u8; 1024];
17289        rng.fill_bytes(&mut buf);
17290        let mut unstructured = Unstructured::new(&buf);
17291        Self::arbitrary(&mut unstructured).unwrap_or_default()
17292    }
17293}
17294impl Default for HIL_STATE_DATA {
17295    fn default() -> Self {
17296        Self::DEFAULT.clone()
17297    }
17298}
17299impl MessageData for HIL_STATE_DATA {
17300    type Message = MavMessage;
17301    const ID: u32 = 90u32;
17302    const NAME: &'static str = "HIL_STATE";
17303    const EXTRA_CRC: u8 = 183u8;
17304    const ENCODED_LEN: usize = 56usize;
17305    fn deser(
17306        _version: MavlinkVersion,
17307        __input: &[u8],
17308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17309        let avail_len = __input.len();
17310        let mut payload_buf = [0; Self::ENCODED_LEN];
17311        let mut buf = if avail_len < Self::ENCODED_LEN {
17312            payload_buf[0..avail_len].copy_from_slice(__input);
17313            Bytes::new(&payload_buf)
17314        } else {
17315            Bytes::new(__input)
17316        };
17317        let mut __struct = Self::default();
17318        __struct.time_usec = buf.get_u64_le();
17319        __struct.roll = buf.get_f32_le();
17320        __struct.pitch = buf.get_f32_le();
17321        __struct.yaw = buf.get_f32_le();
17322        __struct.rollspeed = buf.get_f32_le();
17323        __struct.pitchspeed = buf.get_f32_le();
17324        __struct.yawspeed = buf.get_f32_le();
17325        __struct.lat = buf.get_i32_le();
17326        __struct.lon = buf.get_i32_le();
17327        __struct.alt = buf.get_i32_le();
17328        __struct.vx = buf.get_i16_le();
17329        __struct.vy = buf.get_i16_le();
17330        __struct.vz = buf.get_i16_le();
17331        __struct.xacc = buf.get_i16_le();
17332        __struct.yacc = buf.get_i16_le();
17333        __struct.zacc = buf.get_i16_le();
17334        Ok(__struct)
17335    }
17336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17337        let mut __tmp = BytesMut::new(bytes);
17338        #[allow(clippy::absurd_extreme_comparisons)]
17339        #[allow(unused_comparisons)]
17340        if __tmp.remaining() < Self::ENCODED_LEN {
17341            panic!(
17342                "buffer is too small (need {} bytes, but got {})",
17343                Self::ENCODED_LEN,
17344                __tmp.remaining(),
17345            )
17346        }
17347        __tmp.put_u64_le(self.time_usec);
17348        __tmp.put_f32_le(self.roll);
17349        __tmp.put_f32_le(self.pitch);
17350        __tmp.put_f32_le(self.yaw);
17351        __tmp.put_f32_le(self.rollspeed);
17352        __tmp.put_f32_le(self.pitchspeed);
17353        __tmp.put_f32_le(self.yawspeed);
17354        __tmp.put_i32_le(self.lat);
17355        __tmp.put_i32_le(self.lon);
17356        __tmp.put_i32_le(self.alt);
17357        __tmp.put_i16_le(self.vx);
17358        __tmp.put_i16_le(self.vy);
17359        __tmp.put_i16_le(self.vz);
17360        __tmp.put_i16_le(self.xacc);
17361        __tmp.put_i16_le(self.yacc);
17362        __tmp.put_i16_le(self.zacc);
17363        if matches!(version, MavlinkVersion::V2) {
17364            let len = __tmp.len();
17365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17366        } else {
17367            __tmp.len()
17368        }
17369    }
17370}
17371#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17372#[doc = ""]
17373#[doc = "ID: 115"]
17374#[derive(Debug, Clone, PartialEq)]
17375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17377#[cfg_attr(feature = "ts", derive(TS))]
17378#[cfg_attr(feature = "ts", ts(export))]
17379pub struct HIL_STATE_QUATERNION_DATA {
17380    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17381    pub time_usec: u64,
17382    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17383    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17384    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17385    pub attitude_quaternion: [f32; 4],
17386    #[doc = "Body frame roll / phi angular speed"]
17387    pub rollspeed: f32,
17388    #[doc = "Body frame pitch / theta angular speed"]
17389    pub pitchspeed: f32,
17390    #[doc = "Body frame yaw / psi angular speed"]
17391    pub yawspeed: f32,
17392    #[doc = "Latitude"]
17393    pub lat: i32,
17394    #[doc = "Longitude"]
17395    pub lon: i32,
17396    #[doc = "Altitude"]
17397    pub alt: i32,
17398    #[doc = "Ground X Speed (Latitude)"]
17399    pub vx: i16,
17400    #[doc = "Ground Y Speed (Longitude)"]
17401    pub vy: i16,
17402    #[doc = "Ground Z Speed (Altitude)"]
17403    pub vz: i16,
17404    #[doc = "Indicated airspeed"]
17405    pub ind_airspeed: u16,
17406    #[doc = "True airspeed"]
17407    pub true_airspeed: u16,
17408    #[doc = "X acceleration"]
17409    pub xacc: i16,
17410    #[doc = "Y acceleration"]
17411    pub yacc: i16,
17412    #[doc = "Z acceleration"]
17413    pub zacc: i16,
17414}
17415impl HIL_STATE_QUATERNION_DATA {
17416    pub const ENCODED_LEN: usize = 64usize;
17417    pub const DEFAULT: Self = Self {
17418        time_usec: 0_u64,
17419        attitude_quaternion: [0.0_f32; 4usize],
17420        rollspeed: 0.0_f32,
17421        pitchspeed: 0.0_f32,
17422        yawspeed: 0.0_f32,
17423        lat: 0_i32,
17424        lon: 0_i32,
17425        alt: 0_i32,
17426        vx: 0_i16,
17427        vy: 0_i16,
17428        vz: 0_i16,
17429        ind_airspeed: 0_u16,
17430        true_airspeed: 0_u16,
17431        xacc: 0_i16,
17432        yacc: 0_i16,
17433        zacc: 0_i16,
17434    };
17435    #[cfg(feature = "arbitrary")]
17436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17437        use arbitrary::{Arbitrary, Unstructured};
17438        let mut buf = [0u8; 1024];
17439        rng.fill_bytes(&mut buf);
17440        let mut unstructured = Unstructured::new(&buf);
17441        Self::arbitrary(&mut unstructured).unwrap_or_default()
17442    }
17443}
17444impl Default for HIL_STATE_QUATERNION_DATA {
17445    fn default() -> Self {
17446        Self::DEFAULT.clone()
17447    }
17448}
17449impl MessageData for HIL_STATE_QUATERNION_DATA {
17450    type Message = MavMessage;
17451    const ID: u32 = 115u32;
17452    const NAME: &'static str = "HIL_STATE_QUATERNION";
17453    const EXTRA_CRC: u8 = 4u8;
17454    const ENCODED_LEN: usize = 64usize;
17455    fn deser(
17456        _version: MavlinkVersion,
17457        __input: &[u8],
17458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17459        let avail_len = __input.len();
17460        let mut payload_buf = [0; Self::ENCODED_LEN];
17461        let mut buf = if avail_len < Self::ENCODED_LEN {
17462            payload_buf[0..avail_len].copy_from_slice(__input);
17463            Bytes::new(&payload_buf)
17464        } else {
17465            Bytes::new(__input)
17466        };
17467        let mut __struct = Self::default();
17468        __struct.time_usec = buf.get_u64_le();
17469        for v in &mut __struct.attitude_quaternion {
17470            let val = buf.get_f32_le();
17471            *v = val;
17472        }
17473        __struct.rollspeed = buf.get_f32_le();
17474        __struct.pitchspeed = buf.get_f32_le();
17475        __struct.yawspeed = buf.get_f32_le();
17476        __struct.lat = buf.get_i32_le();
17477        __struct.lon = buf.get_i32_le();
17478        __struct.alt = buf.get_i32_le();
17479        __struct.vx = buf.get_i16_le();
17480        __struct.vy = buf.get_i16_le();
17481        __struct.vz = buf.get_i16_le();
17482        __struct.ind_airspeed = buf.get_u16_le();
17483        __struct.true_airspeed = buf.get_u16_le();
17484        __struct.xacc = buf.get_i16_le();
17485        __struct.yacc = buf.get_i16_le();
17486        __struct.zacc = buf.get_i16_le();
17487        Ok(__struct)
17488    }
17489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17490        let mut __tmp = BytesMut::new(bytes);
17491        #[allow(clippy::absurd_extreme_comparisons)]
17492        #[allow(unused_comparisons)]
17493        if __tmp.remaining() < Self::ENCODED_LEN {
17494            panic!(
17495                "buffer is too small (need {} bytes, but got {})",
17496                Self::ENCODED_LEN,
17497                __tmp.remaining(),
17498            )
17499        }
17500        __tmp.put_u64_le(self.time_usec);
17501        for val in &self.attitude_quaternion {
17502            __tmp.put_f32_le(*val);
17503        }
17504        __tmp.put_f32_le(self.rollspeed);
17505        __tmp.put_f32_le(self.pitchspeed);
17506        __tmp.put_f32_le(self.yawspeed);
17507        __tmp.put_i32_le(self.lat);
17508        __tmp.put_i32_le(self.lon);
17509        __tmp.put_i32_le(self.alt);
17510        __tmp.put_i16_le(self.vx);
17511        __tmp.put_i16_le(self.vy);
17512        __tmp.put_i16_le(self.vz);
17513        __tmp.put_u16_le(self.ind_airspeed);
17514        __tmp.put_u16_le(self.true_airspeed);
17515        __tmp.put_i16_le(self.xacc);
17516        __tmp.put_i16_le(self.yacc);
17517        __tmp.put_i16_le(self.zacc);
17518        if matches!(version, MavlinkVersion::V2) {
17519            let len = __tmp.len();
17520            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17521        } else {
17522            __tmp.len()
17523        }
17524    }
17525}
17526#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17527#[doc = ""]
17528#[doc = "ID: 242"]
17529#[derive(Debug, Clone, PartialEq)]
17530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17532#[cfg_attr(feature = "ts", derive(TS))]
17533#[cfg_attr(feature = "ts", ts(export))]
17534pub struct HOME_POSITION_DATA {
17535    #[doc = "Latitude (WGS84)"]
17536    pub latitude: i32,
17537    #[doc = "Longitude (WGS84)"]
17538    pub longitude: i32,
17539    #[doc = "Altitude (MSL). Positive for up."]
17540    pub altitude: i32,
17541    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17542    pub x: f32,
17543    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17544    pub y: f32,
17545    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17546    pub z: f32,
17547    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17548    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17549    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17550    pub q: [f32; 4],
17551    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17552    pub approach_x: f32,
17553    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17554    pub approach_y: f32,
17555    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17556    pub approach_z: f32,
17557    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17558    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17559    pub time_usec: u64,
17560}
17561impl HOME_POSITION_DATA {
17562    pub const ENCODED_LEN: usize = 60usize;
17563    pub const DEFAULT: Self = Self {
17564        latitude: 0_i32,
17565        longitude: 0_i32,
17566        altitude: 0_i32,
17567        x: 0.0_f32,
17568        y: 0.0_f32,
17569        z: 0.0_f32,
17570        q: [0.0_f32; 4usize],
17571        approach_x: 0.0_f32,
17572        approach_y: 0.0_f32,
17573        approach_z: 0.0_f32,
17574        time_usec: 0_u64,
17575    };
17576    #[cfg(feature = "arbitrary")]
17577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17578        use arbitrary::{Arbitrary, Unstructured};
17579        let mut buf = [0u8; 1024];
17580        rng.fill_bytes(&mut buf);
17581        let mut unstructured = Unstructured::new(&buf);
17582        Self::arbitrary(&mut unstructured).unwrap_or_default()
17583    }
17584}
17585impl Default for HOME_POSITION_DATA {
17586    fn default() -> Self {
17587        Self::DEFAULT.clone()
17588    }
17589}
17590impl MessageData for HOME_POSITION_DATA {
17591    type Message = MavMessage;
17592    const ID: u32 = 242u32;
17593    const NAME: &'static str = "HOME_POSITION";
17594    const EXTRA_CRC: u8 = 104u8;
17595    const ENCODED_LEN: usize = 60usize;
17596    fn deser(
17597        _version: MavlinkVersion,
17598        __input: &[u8],
17599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17600        let avail_len = __input.len();
17601        let mut payload_buf = [0; Self::ENCODED_LEN];
17602        let mut buf = if avail_len < Self::ENCODED_LEN {
17603            payload_buf[0..avail_len].copy_from_slice(__input);
17604            Bytes::new(&payload_buf)
17605        } else {
17606            Bytes::new(__input)
17607        };
17608        let mut __struct = Self::default();
17609        __struct.latitude = buf.get_i32_le();
17610        __struct.longitude = buf.get_i32_le();
17611        __struct.altitude = buf.get_i32_le();
17612        __struct.x = buf.get_f32_le();
17613        __struct.y = buf.get_f32_le();
17614        __struct.z = buf.get_f32_le();
17615        for v in &mut __struct.q {
17616            let val = buf.get_f32_le();
17617            *v = val;
17618        }
17619        __struct.approach_x = buf.get_f32_le();
17620        __struct.approach_y = buf.get_f32_le();
17621        __struct.approach_z = buf.get_f32_le();
17622        __struct.time_usec = buf.get_u64_le();
17623        Ok(__struct)
17624    }
17625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17626        let mut __tmp = BytesMut::new(bytes);
17627        #[allow(clippy::absurd_extreme_comparisons)]
17628        #[allow(unused_comparisons)]
17629        if __tmp.remaining() < Self::ENCODED_LEN {
17630            panic!(
17631                "buffer is too small (need {} bytes, but got {})",
17632                Self::ENCODED_LEN,
17633                __tmp.remaining(),
17634            )
17635        }
17636        __tmp.put_i32_le(self.latitude);
17637        __tmp.put_i32_le(self.longitude);
17638        __tmp.put_i32_le(self.altitude);
17639        __tmp.put_f32_le(self.x);
17640        __tmp.put_f32_le(self.y);
17641        __tmp.put_f32_le(self.z);
17642        for val in &self.q {
17643            __tmp.put_f32_le(*val);
17644        }
17645        __tmp.put_f32_le(self.approach_x);
17646        __tmp.put_f32_le(self.approach_y);
17647        __tmp.put_f32_le(self.approach_z);
17648        if matches!(version, MavlinkVersion::V2) {
17649            __tmp.put_u64_le(self.time_usec);
17650            let len = __tmp.len();
17651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17652        } else {
17653            __tmp.len()
17654        }
17655    }
17656}
17657#[doc = "Temperature and humidity from hygrometer."]
17658#[doc = ""]
17659#[doc = "ID: 12920"]
17660#[derive(Debug, Clone, PartialEq)]
17661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17663#[cfg_attr(feature = "ts", derive(TS))]
17664#[cfg_attr(feature = "ts", ts(export))]
17665pub struct HYGROMETER_SENSOR_DATA {
17666    #[doc = "Temperature"]
17667    pub temperature: i16,
17668    #[doc = "Humidity"]
17669    pub humidity: u16,
17670    #[doc = "Hygrometer ID"]
17671    pub id: u8,
17672}
17673impl HYGROMETER_SENSOR_DATA {
17674    pub const ENCODED_LEN: usize = 5usize;
17675    pub const DEFAULT: Self = Self {
17676        temperature: 0_i16,
17677        humidity: 0_u16,
17678        id: 0_u8,
17679    };
17680    #[cfg(feature = "arbitrary")]
17681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17682        use arbitrary::{Arbitrary, Unstructured};
17683        let mut buf = [0u8; 1024];
17684        rng.fill_bytes(&mut buf);
17685        let mut unstructured = Unstructured::new(&buf);
17686        Self::arbitrary(&mut unstructured).unwrap_or_default()
17687    }
17688}
17689impl Default for HYGROMETER_SENSOR_DATA {
17690    fn default() -> Self {
17691        Self::DEFAULT.clone()
17692    }
17693}
17694impl MessageData for HYGROMETER_SENSOR_DATA {
17695    type Message = MavMessage;
17696    const ID: u32 = 12920u32;
17697    const NAME: &'static str = "HYGROMETER_SENSOR";
17698    const EXTRA_CRC: u8 = 20u8;
17699    const ENCODED_LEN: usize = 5usize;
17700    fn deser(
17701        _version: MavlinkVersion,
17702        __input: &[u8],
17703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17704        let avail_len = __input.len();
17705        let mut payload_buf = [0; Self::ENCODED_LEN];
17706        let mut buf = if avail_len < Self::ENCODED_LEN {
17707            payload_buf[0..avail_len].copy_from_slice(__input);
17708            Bytes::new(&payload_buf)
17709        } else {
17710            Bytes::new(__input)
17711        };
17712        let mut __struct = Self::default();
17713        __struct.temperature = buf.get_i16_le();
17714        __struct.humidity = buf.get_u16_le();
17715        __struct.id = buf.get_u8();
17716        Ok(__struct)
17717    }
17718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17719        let mut __tmp = BytesMut::new(bytes);
17720        #[allow(clippy::absurd_extreme_comparisons)]
17721        #[allow(unused_comparisons)]
17722        if __tmp.remaining() < Self::ENCODED_LEN {
17723            panic!(
17724                "buffer is too small (need {} bytes, but got {})",
17725                Self::ENCODED_LEN,
17726                __tmp.remaining(),
17727            )
17728        }
17729        __tmp.put_i16_le(self.temperature);
17730        __tmp.put_u16_le(self.humidity);
17731        __tmp.put_u8(self.id);
17732        if matches!(version, MavlinkVersion::V2) {
17733            let len = __tmp.len();
17734            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17735        } else {
17736            __tmp.len()
17737        }
17738    }
17739}
17740#[doc = "Illuminator status."]
17741#[doc = ""]
17742#[doc = "ID: 440"]
17743#[derive(Debug, Clone, PartialEq)]
17744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17745#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17746#[cfg_attr(feature = "ts", derive(TS))]
17747#[cfg_attr(feature = "ts", ts(export))]
17748pub struct ILLUMINATOR_STATUS_DATA {
17749    #[doc = "Time since the start-up of the illuminator in ms"]
17750    pub uptime_ms: u32,
17751    #[doc = "Errors"]
17752    pub error_status: IlluminatorErrorFlags,
17753    #[doc = "Illuminator brightness"]
17754    pub brightness: f32,
17755    #[doc = "Illuminator strobing period in seconds"]
17756    pub strobe_period: f32,
17757    #[doc = "Illuminator strobing duty cycle"]
17758    pub strobe_duty_cycle: f32,
17759    #[doc = "Temperature in Celsius"]
17760    pub temp_c: f32,
17761    #[doc = "Minimum strobing period in seconds"]
17762    pub min_strobe_period: f32,
17763    #[doc = "Maximum strobing period in seconds"]
17764    pub max_strobe_period: f32,
17765    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17766    pub enable: u8,
17767    #[doc = "Supported illuminator modes"]
17768    pub mode_bitmask: IlluminatorMode,
17769    #[doc = "Illuminator mode"]
17770    pub mode: IlluminatorMode,
17771}
17772impl ILLUMINATOR_STATUS_DATA {
17773    pub const ENCODED_LEN: usize = 35usize;
17774    pub const DEFAULT: Self = Self {
17775        uptime_ms: 0_u32,
17776        error_status: IlluminatorErrorFlags::DEFAULT,
17777        brightness: 0.0_f32,
17778        strobe_period: 0.0_f32,
17779        strobe_duty_cycle: 0.0_f32,
17780        temp_c: 0.0_f32,
17781        min_strobe_period: 0.0_f32,
17782        max_strobe_period: 0.0_f32,
17783        enable: 0_u8,
17784        mode_bitmask: IlluminatorMode::DEFAULT,
17785        mode: IlluminatorMode::DEFAULT,
17786    };
17787    #[cfg(feature = "arbitrary")]
17788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17789        use arbitrary::{Arbitrary, Unstructured};
17790        let mut buf = [0u8; 1024];
17791        rng.fill_bytes(&mut buf);
17792        let mut unstructured = Unstructured::new(&buf);
17793        Self::arbitrary(&mut unstructured).unwrap_or_default()
17794    }
17795}
17796impl Default for ILLUMINATOR_STATUS_DATA {
17797    fn default() -> Self {
17798        Self::DEFAULT.clone()
17799    }
17800}
17801impl MessageData for ILLUMINATOR_STATUS_DATA {
17802    type Message = MavMessage;
17803    const ID: u32 = 440u32;
17804    const NAME: &'static str = "ILLUMINATOR_STATUS";
17805    const EXTRA_CRC: u8 = 66u8;
17806    const ENCODED_LEN: usize = 35usize;
17807    fn deser(
17808        _version: MavlinkVersion,
17809        __input: &[u8],
17810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17811        let avail_len = __input.len();
17812        let mut payload_buf = [0; Self::ENCODED_LEN];
17813        let mut buf = if avail_len < Self::ENCODED_LEN {
17814            payload_buf[0..avail_len].copy_from_slice(__input);
17815            Bytes::new(&payload_buf)
17816        } else {
17817            Bytes::new(__input)
17818        };
17819        let mut __struct = Self::default();
17820        __struct.uptime_ms = buf.get_u32_le();
17821        let tmp = buf.get_u32_le();
17822        __struct.error_status = IlluminatorErrorFlags::from_bits(
17823            tmp & IlluminatorErrorFlags::all().bits(),
17824        )
17825        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17826            flag_type: "IlluminatorErrorFlags",
17827            value: tmp as u32,
17828        })?;
17829        __struct.brightness = buf.get_f32_le();
17830        __struct.strobe_period = buf.get_f32_le();
17831        __struct.strobe_duty_cycle = buf.get_f32_le();
17832        __struct.temp_c = buf.get_f32_le();
17833        __struct.min_strobe_period = buf.get_f32_le();
17834        __struct.max_strobe_period = buf.get_f32_le();
17835        __struct.enable = buf.get_u8();
17836        let tmp = buf.get_u8();
17837        __struct.mode_bitmask =
17838            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17839                enum_type: "IlluminatorMode",
17840                value: tmp as u32,
17841            })?;
17842        let tmp = buf.get_u8();
17843        __struct.mode =
17844            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17845                enum_type: "IlluminatorMode",
17846                value: tmp as u32,
17847            })?;
17848        Ok(__struct)
17849    }
17850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17851        let mut __tmp = BytesMut::new(bytes);
17852        #[allow(clippy::absurd_extreme_comparisons)]
17853        #[allow(unused_comparisons)]
17854        if __tmp.remaining() < Self::ENCODED_LEN {
17855            panic!(
17856                "buffer is too small (need {} bytes, but got {})",
17857                Self::ENCODED_LEN,
17858                __tmp.remaining(),
17859            )
17860        }
17861        __tmp.put_u32_le(self.uptime_ms);
17862        __tmp.put_u32_le(self.error_status.bits());
17863        __tmp.put_f32_le(self.brightness);
17864        __tmp.put_f32_le(self.strobe_period);
17865        __tmp.put_f32_le(self.strobe_duty_cycle);
17866        __tmp.put_f32_le(self.temp_c);
17867        __tmp.put_f32_le(self.min_strobe_period);
17868        __tmp.put_f32_le(self.max_strobe_period);
17869        __tmp.put_u8(self.enable);
17870        __tmp.put_u8(self.mode_bitmask as u8);
17871        __tmp.put_u8(self.mode as u8);
17872        if matches!(version, MavlinkVersion::V2) {
17873            let len = __tmp.len();
17874            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17875        } else {
17876            __tmp.len()
17877        }
17878    }
17879}
17880#[doc = "Status of the Iridium SBD link."]
17881#[doc = ""]
17882#[doc = "ID: 335"]
17883#[derive(Debug, Clone, PartialEq)]
17884#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17885#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17886#[cfg_attr(feature = "ts", derive(TS))]
17887#[cfg_attr(feature = "ts", ts(export))]
17888pub struct ISBD_LINK_STATUS_DATA {
17889    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17890    pub timestamp: u64,
17891    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17892    pub last_heartbeat: u64,
17893    #[doc = "Number of failed SBD sessions."]
17894    pub failed_sessions: u16,
17895    #[doc = "Number of successful SBD sessions."]
17896    pub successful_sessions: u16,
17897    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17898    pub signal_quality: u8,
17899    #[doc = "1: Ring call pending, 0: No call pending."]
17900    pub ring_pending: u8,
17901    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17902    pub tx_session_pending: u8,
17903    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17904    pub rx_session_pending: u8,
17905}
17906impl ISBD_LINK_STATUS_DATA {
17907    pub const ENCODED_LEN: usize = 24usize;
17908    pub const DEFAULT: Self = Self {
17909        timestamp: 0_u64,
17910        last_heartbeat: 0_u64,
17911        failed_sessions: 0_u16,
17912        successful_sessions: 0_u16,
17913        signal_quality: 0_u8,
17914        ring_pending: 0_u8,
17915        tx_session_pending: 0_u8,
17916        rx_session_pending: 0_u8,
17917    };
17918    #[cfg(feature = "arbitrary")]
17919    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17920        use arbitrary::{Arbitrary, Unstructured};
17921        let mut buf = [0u8; 1024];
17922        rng.fill_bytes(&mut buf);
17923        let mut unstructured = Unstructured::new(&buf);
17924        Self::arbitrary(&mut unstructured).unwrap_or_default()
17925    }
17926}
17927impl Default for ISBD_LINK_STATUS_DATA {
17928    fn default() -> Self {
17929        Self::DEFAULT.clone()
17930    }
17931}
17932impl MessageData for ISBD_LINK_STATUS_DATA {
17933    type Message = MavMessage;
17934    const ID: u32 = 335u32;
17935    const NAME: &'static str = "ISBD_LINK_STATUS";
17936    const EXTRA_CRC: u8 = 225u8;
17937    const ENCODED_LEN: usize = 24usize;
17938    fn deser(
17939        _version: MavlinkVersion,
17940        __input: &[u8],
17941    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17942        let avail_len = __input.len();
17943        let mut payload_buf = [0; Self::ENCODED_LEN];
17944        let mut buf = if avail_len < Self::ENCODED_LEN {
17945            payload_buf[0..avail_len].copy_from_slice(__input);
17946            Bytes::new(&payload_buf)
17947        } else {
17948            Bytes::new(__input)
17949        };
17950        let mut __struct = Self::default();
17951        __struct.timestamp = buf.get_u64_le();
17952        __struct.last_heartbeat = buf.get_u64_le();
17953        __struct.failed_sessions = buf.get_u16_le();
17954        __struct.successful_sessions = buf.get_u16_le();
17955        __struct.signal_quality = buf.get_u8();
17956        __struct.ring_pending = buf.get_u8();
17957        __struct.tx_session_pending = buf.get_u8();
17958        __struct.rx_session_pending = buf.get_u8();
17959        Ok(__struct)
17960    }
17961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17962        let mut __tmp = BytesMut::new(bytes);
17963        #[allow(clippy::absurd_extreme_comparisons)]
17964        #[allow(unused_comparisons)]
17965        if __tmp.remaining() < Self::ENCODED_LEN {
17966            panic!(
17967                "buffer is too small (need {} bytes, but got {})",
17968                Self::ENCODED_LEN,
17969                __tmp.remaining(),
17970            )
17971        }
17972        __tmp.put_u64_le(self.timestamp);
17973        __tmp.put_u64_le(self.last_heartbeat);
17974        __tmp.put_u16_le(self.failed_sessions);
17975        __tmp.put_u16_le(self.successful_sessions);
17976        __tmp.put_u8(self.signal_quality);
17977        __tmp.put_u8(self.ring_pending);
17978        __tmp.put_u8(self.tx_session_pending);
17979        __tmp.put_u8(self.rx_session_pending);
17980        if matches!(version, MavlinkVersion::V2) {
17981            let len = __tmp.len();
17982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17983        } else {
17984            __tmp.len()
17985        }
17986    }
17987}
17988#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17989#[doc = ""]
17990#[doc = "ID: 149"]
17991#[derive(Debug, Clone, PartialEq)]
17992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17994#[cfg_attr(feature = "ts", derive(TS))]
17995#[cfg_attr(feature = "ts", ts(export))]
17996pub struct LANDING_TARGET_DATA {
17997    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17998    pub time_usec: u64,
17999    #[doc = "X-axis angular offset of the target from the center of the image"]
18000    pub angle_x: f32,
18001    #[doc = "Y-axis angular offset of the target from the center of the image"]
18002    pub angle_y: f32,
18003    #[doc = "Distance to the target from the vehicle"]
18004    pub distance: f32,
18005    #[doc = "Size of target along x-axis"]
18006    pub size_x: f32,
18007    #[doc = "Size of target along y-axis"]
18008    pub size_y: f32,
18009    #[doc = "The ID of the target if multiple targets are present"]
18010    pub target_num: u8,
18011    #[doc = "Coordinate frame used for following fields."]
18012    pub frame: MavFrame,
18013    #[doc = "X Position of the landing target in MAV_FRAME"]
18014    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18015    pub x: f32,
18016    #[doc = "Y Position of the landing target in MAV_FRAME"]
18017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18018    pub y: f32,
18019    #[doc = "Z Position of the landing target in MAV_FRAME"]
18020    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18021    pub z: f32,
18022    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18023    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18025    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18026    pub q: [f32; 4],
18027    #[doc = "Type of landing target"]
18028    #[cfg_attr(feature = "serde", serde(default))]
18029    pub mavtype: LandingTargetType,
18030    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18031    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18032    pub position_valid: u8,
18033}
18034impl LANDING_TARGET_DATA {
18035    pub const ENCODED_LEN: usize = 60usize;
18036    pub const DEFAULT: Self = Self {
18037        time_usec: 0_u64,
18038        angle_x: 0.0_f32,
18039        angle_y: 0.0_f32,
18040        distance: 0.0_f32,
18041        size_x: 0.0_f32,
18042        size_y: 0.0_f32,
18043        target_num: 0_u8,
18044        frame: MavFrame::DEFAULT,
18045        x: 0.0_f32,
18046        y: 0.0_f32,
18047        z: 0.0_f32,
18048        q: [0.0_f32; 4usize],
18049        mavtype: LandingTargetType::DEFAULT,
18050        position_valid: 0_u8,
18051    };
18052    #[cfg(feature = "arbitrary")]
18053    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18054        use arbitrary::{Arbitrary, Unstructured};
18055        let mut buf = [0u8; 1024];
18056        rng.fill_bytes(&mut buf);
18057        let mut unstructured = Unstructured::new(&buf);
18058        Self::arbitrary(&mut unstructured).unwrap_or_default()
18059    }
18060}
18061impl Default for LANDING_TARGET_DATA {
18062    fn default() -> Self {
18063        Self::DEFAULT.clone()
18064    }
18065}
18066impl MessageData for LANDING_TARGET_DATA {
18067    type Message = MavMessage;
18068    const ID: u32 = 149u32;
18069    const NAME: &'static str = "LANDING_TARGET";
18070    const EXTRA_CRC: u8 = 200u8;
18071    const ENCODED_LEN: usize = 60usize;
18072    fn deser(
18073        _version: MavlinkVersion,
18074        __input: &[u8],
18075    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18076        let avail_len = __input.len();
18077        let mut payload_buf = [0; Self::ENCODED_LEN];
18078        let mut buf = if avail_len < Self::ENCODED_LEN {
18079            payload_buf[0..avail_len].copy_from_slice(__input);
18080            Bytes::new(&payload_buf)
18081        } else {
18082            Bytes::new(__input)
18083        };
18084        let mut __struct = Self::default();
18085        __struct.time_usec = buf.get_u64_le();
18086        __struct.angle_x = buf.get_f32_le();
18087        __struct.angle_y = buf.get_f32_le();
18088        __struct.distance = buf.get_f32_le();
18089        __struct.size_x = buf.get_f32_le();
18090        __struct.size_y = buf.get_f32_le();
18091        __struct.target_num = buf.get_u8();
18092        let tmp = buf.get_u8();
18093        __struct.frame =
18094            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18095                enum_type: "MavFrame",
18096                value: tmp as u32,
18097            })?;
18098        __struct.x = buf.get_f32_le();
18099        __struct.y = buf.get_f32_le();
18100        __struct.z = buf.get_f32_le();
18101        for v in &mut __struct.q {
18102            let val = buf.get_f32_le();
18103            *v = val;
18104        }
18105        let tmp = buf.get_u8();
18106        __struct.mavtype =
18107            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18108                enum_type: "LandingTargetType",
18109                value: tmp as u32,
18110            })?;
18111        __struct.position_valid = buf.get_u8();
18112        Ok(__struct)
18113    }
18114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18115        let mut __tmp = BytesMut::new(bytes);
18116        #[allow(clippy::absurd_extreme_comparisons)]
18117        #[allow(unused_comparisons)]
18118        if __tmp.remaining() < Self::ENCODED_LEN {
18119            panic!(
18120                "buffer is too small (need {} bytes, but got {})",
18121                Self::ENCODED_LEN,
18122                __tmp.remaining(),
18123            )
18124        }
18125        __tmp.put_u64_le(self.time_usec);
18126        __tmp.put_f32_le(self.angle_x);
18127        __tmp.put_f32_le(self.angle_y);
18128        __tmp.put_f32_le(self.distance);
18129        __tmp.put_f32_le(self.size_x);
18130        __tmp.put_f32_le(self.size_y);
18131        __tmp.put_u8(self.target_num);
18132        __tmp.put_u8(self.frame as u8);
18133        if matches!(version, MavlinkVersion::V2) {
18134            __tmp.put_f32_le(self.x);
18135            __tmp.put_f32_le(self.y);
18136            __tmp.put_f32_le(self.z);
18137            for val in &self.q {
18138                __tmp.put_f32_le(*val);
18139            }
18140            __tmp.put_u8(self.mavtype as u8);
18141            __tmp.put_u8(self.position_valid);
18142            let len = __tmp.len();
18143            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18144        } else {
18145            __tmp.len()
18146        }
18147    }
18148}
18149#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18150#[doc = ""]
18151#[doc = "ID: 8"]
18152#[derive(Debug, Clone, PartialEq)]
18153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18155#[cfg_attr(feature = "ts", derive(TS))]
18156#[cfg_attr(feature = "ts", ts(export))]
18157pub struct LINK_NODE_STATUS_DATA {
18158    #[doc = "Timestamp (time since system boot)."]
18159    pub timestamp: u64,
18160    #[doc = "Transmit rate"]
18161    pub tx_rate: u32,
18162    #[doc = "Receive rate"]
18163    pub rx_rate: u32,
18164    #[doc = "Messages sent"]
18165    pub messages_sent: u32,
18166    #[doc = "Messages received (estimated from counting seq)"]
18167    pub messages_received: u32,
18168    #[doc = "Messages lost (estimated from counting seq)"]
18169    pub messages_lost: u32,
18170    #[doc = "Number of bytes that could not be parsed correctly."]
18171    pub rx_parse_err: u16,
18172    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18173    pub tx_overflows: u16,
18174    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18175    pub rx_overflows: u16,
18176    #[doc = "Remaining free transmit buffer space"]
18177    pub tx_buf: u8,
18178    #[doc = "Remaining free receive buffer space"]
18179    pub rx_buf: u8,
18180}
18181impl LINK_NODE_STATUS_DATA {
18182    pub const ENCODED_LEN: usize = 36usize;
18183    pub const DEFAULT: Self = Self {
18184        timestamp: 0_u64,
18185        tx_rate: 0_u32,
18186        rx_rate: 0_u32,
18187        messages_sent: 0_u32,
18188        messages_received: 0_u32,
18189        messages_lost: 0_u32,
18190        rx_parse_err: 0_u16,
18191        tx_overflows: 0_u16,
18192        rx_overflows: 0_u16,
18193        tx_buf: 0_u8,
18194        rx_buf: 0_u8,
18195    };
18196    #[cfg(feature = "arbitrary")]
18197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18198        use arbitrary::{Arbitrary, Unstructured};
18199        let mut buf = [0u8; 1024];
18200        rng.fill_bytes(&mut buf);
18201        let mut unstructured = Unstructured::new(&buf);
18202        Self::arbitrary(&mut unstructured).unwrap_or_default()
18203    }
18204}
18205impl Default for LINK_NODE_STATUS_DATA {
18206    fn default() -> Self {
18207        Self::DEFAULT.clone()
18208    }
18209}
18210impl MessageData for LINK_NODE_STATUS_DATA {
18211    type Message = MavMessage;
18212    const ID: u32 = 8u32;
18213    const NAME: &'static str = "LINK_NODE_STATUS";
18214    const EXTRA_CRC: u8 = 117u8;
18215    const ENCODED_LEN: usize = 36usize;
18216    fn deser(
18217        _version: MavlinkVersion,
18218        __input: &[u8],
18219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18220        let avail_len = __input.len();
18221        let mut payload_buf = [0; Self::ENCODED_LEN];
18222        let mut buf = if avail_len < Self::ENCODED_LEN {
18223            payload_buf[0..avail_len].copy_from_slice(__input);
18224            Bytes::new(&payload_buf)
18225        } else {
18226            Bytes::new(__input)
18227        };
18228        let mut __struct = Self::default();
18229        __struct.timestamp = buf.get_u64_le();
18230        __struct.tx_rate = buf.get_u32_le();
18231        __struct.rx_rate = buf.get_u32_le();
18232        __struct.messages_sent = buf.get_u32_le();
18233        __struct.messages_received = buf.get_u32_le();
18234        __struct.messages_lost = buf.get_u32_le();
18235        __struct.rx_parse_err = buf.get_u16_le();
18236        __struct.tx_overflows = buf.get_u16_le();
18237        __struct.rx_overflows = buf.get_u16_le();
18238        __struct.tx_buf = buf.get_u8();
18239        __struct.rx_buf = buf.get_u8();
18240        Ok(__struct)
18241    }
18242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18243        let mut __tmp = BytesMut::new(bytes);
18244        #[allow(clippy::absurd_extreme_comparisons)]
18245        #[allow(unused_comparisons)]
18246        if __tmp.remaining() < Self::ENCODED_LEN {
18247            panic!(
18248                "buffer is too small (need {} bytes, but got {})",
18249                Self::ENCODED_LEN,
18250                __tmp.remaining(),
18251            )
18252        }
18253        __tmp.put_u64_le(self.timestamp);
18254        __tmp.put_u32_le(self.tx_rate);
18255        __tmp.put_u32_le(self.rx_rate);
18256        __tmp.put_u32_le(self.messages_sent);
18257        __tmp.put_u32_le(self.messages_received);
18258        __tmp.put_u32_le(self.messages_lost);
18259        __tmp.put_u16_le(self.rx_parse_err);
18260        __tmp.put_u16_le(self.tx_overflows);
18261        __tmp.put_u16_le(self.rx_overflows);
18262        __tmp.put_u8(self.tx_buf);
18263        __tmp.put_u8(self.rx_buf);
18264        if matches!(version, MavlinkVersion::V2) {
18265            let len = __tmp.len();
18266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18267        } else {
18268            __tmp.len()
18269        }
18270    }
18271}
18272#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18273#[doc = ""]
18274#[doc = "ID: 32"]
18275#[derive(Debug, Clone, PartialEq)]
18276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18278#[cfg_attr(feature = "ts", derive(TS))]
18279#[cfg_attr(feature = "ts", ts(export))]
18280pub struct LOCAL_POSITION_NED_DATA {
18281    #[doc = "Timestamp (time since system boot)."]
18282    pub time_boot_ms: u32,
18283    #[doc = "X Position"]
18284    pub x: f32,
18285    #[doc = "Y Position"]
18286    pub y: f32,
18287    #[doc = "Z Position"]
18288    pub z: f32,
18289    #[doc = "X Speed"]
18290    pub vx: f32,
18291    #[doc = "Y Speed"]
18292    pub vy: f32,
18293    #[doc = "Z Speed"]
18294    pub vz: f32,
18295}
18296impl LOCAL_POSITION_NED_DATA {
18297    pub const ENCODED_LEN: usize = 28usize;
18298    pub const DEFAULT: Self = Self {
18299        time_boot_ms: 0_u32,
18300        x: 0.0_f32,
18301        y: 0.0_f32,
18302        z: 0.0_f32,
18303        vx: 0.0_f32,
18304        vy: 0.0_f32,
18305        vz: 0.0_f32,
18306    };
18307    #[cfg(feature = "arbitrary")]
18308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18309        use arbitrary::{Arbitrary, Unstructured};
18310        let mut buf = [0u8; 1024];
18311        rng.fill_bytes(&mut buf);
18312        let mut unstructured = Unstructured::new(&buf);
18313        Self::arbitrary(&mut unstructured).unwrap_or_default()
18314    }
18315}
18316impl Default for LOCAL_POSITION_NED_DATA {
18317    fn default() -> Self {
18318        Self::DEFAULT.clone()
18319    }
18320}
18321impl MessageData for LOCAL_POSITION_NED_DATA {
18322    type Message = MavMessage;
18323    const ID: u32 = 32u32;
18324    const NAME: &'static str = "LOCAL_POSITION_NED";
18325    const EXTRA_CRC: u8 = 185u8;
18326    const ENCODED_LEN: usize = 28usize;
18327    fn deser(
18328        _version: MavlinkVersion,
18329        __input: &[u8],
18330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18331        let avail_len = __input.len();
18332        let mut payload_buf = [0; Self::ENCODED_LEN];
18333        let mut buf = if avail_len < Self::ENCODED_LEN {
18334            payload_buf[0..avail_len].copy_from_slice(__input);
18335            Bytes::new(&payload_buf)
18336        } else {
18337            Bytes::new(__input)
18338        };
18339        let mut __struct = Self::default();
18340        __struct.time_boot_ms = buf.get_u32_le();
18341        __struct.x = buf.get_f32_le();
18342        __struct.y = buf.get_f32_le();
18343        __struct.z = buf.get_f32_le();
18344        __struct.vx = buf.get_f32_le();
18345        __struct.vy = buf.get_f32_le();
18346        __struct.vz = buf.get_f32_le();
18347        Ok(__struct)
18348    }
18349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18350        let mut __tmp = BytesMut::new(bytes);
18351        #[allow(clippy::absurd_extreme_comparisons)]
18352        #[allow(unused_comparisons)]
18353        if __tmp.remaining() < Self::ENCODED_LEN {
18354            panic!(
18355                "buffer is too small (need {} bytes, but got {})",
18356                Self::ENCODED_LEN,
18357                __tmp.remaining(),
18358            )
18359        }
18360        __tmp.put_u32_le(self.time_boot_ms);
18361        __tmp.put_f32_le(self.x);
18362        __tmp.put_f32_le(self.y);
18363        __tmp.put_f32_le(self.z);
18364        __tmp.put_f32_le(self.vx);
18365        __tmp.put_f32_le(self.vy);
18366        __tmp.put_f32_le(self.vz);
18367        if matches!(version, MavlinkVersion::V2) {
18368            let len = __tmp.len();
18369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18370        } else {
18371            __tmp.len()
18372        }
18373    }
18374}
18375#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18376#[doc = ""]
18377#[doc = "ID: 64"]
18378#[derive(Debug, Clone, PartialEq)]
18379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18381#[cfg_attr(feature = "ts", derive(TS))]
18382#[cfg_attr(feature = "ts", ts(export))]
18383pub struct LOCAL_POSITION_NED_COV_DATA {
18384    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18385    pub time_usec: u64,
18386    #[doc = "X Position"]
18387    pub x: f32,
18388    #[doc = "Y Position"]
18389    pub y: f32,
18390    #[doc = "Z Position"]
18391    pub z: f32,
18392    #[doc = "X Speed"]
18393    pub vx: f32,
18394    #[doc = "Y Speed"]
18395    pub vy: f32,
18396    #[doc = "Z Speed"]
18397    pub vz: f32,
18398    #[doc = "X Acceleration"]
18399    pub ax: f32,
18400    #[doc = "Y Acceleration"]
18401    pub ay: f32,
18402    #[doc = "Z Acceleration"]
18403    pub az: f32,
18404    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18406    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18407    pub covariance: [f32; 45],
18408    #[doc = "Class id of the estimator this estimate originated from."]
18409    pub estimator_type: MavEstimatorType,
18410}
18411impl LOCAL_POSITION_NED_COV_DATA {
18412    pub const ENCODED_LEN: usize = 225usize;
18413    pub const DEFAULT: Self = Self {
18414        time_usec: 0_u64,
18415        x: 0.0_f32,
18416        y: 0.0_f32,
18417        z: 0.0_f32,
18418        vx: 0.0_f32,
18419        vy: 0.0_f32,
18420        vz: 0.0_f32,
18421        ax: 0.0_f32,
18422        ay: 0.0_f32,
18423        az: 0.0_f32,
18424        covariance: [0.0_f32; 45usize],
18425        estimator_type: MavEstimatorType::DEFAULT,
18426    };
18427    #[cfg(feature = "arbitrary")]
18428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18429        use arbitrary::{Arbitrary, Unstructured};
18430        let mut buf = [0u8; 1024];
18431        rng.fill_bytes(&mut buf);
18432        let mut unstructured = Unstructured::new(&buf);
18433        Self::arbitrary(&mut unstructured).unwrap_or_default()
18434    }
18435}
18436impl Default for LOCAL_POSITION_NED_COV_DATA {
18437    fn default() -> Self {
18438        Self::DEFAULT.clone()
18439    }
18440}
18441impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18442    type Message = MavMessage;
18443    const ID: u32 = 64u32;
18444    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18445    const EXTRA_CRC: u8 = 191u8;
18446    const ENCODED_LEN: usize = 225usize;
18447    fn deser(
18448        _version: MavlinkVersion,
18449        __input: &[u8],
18450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18451        let avail_len = __input.len();
18452        let mut payload_buf = [0; Self::ENCODED_LEN];
18453        let mut buf = if avail_len < Self::ENCODED_LEN {
18454            payload_buf[0..avail_len].copy_from_slice(__input);
18455            Bytes::new(&payload_buf)
18456        } else {
18457            Bytes::new(__input)
18458        };
18459        let mut __struct = Self::default();
18460        __struct.time_usec = buf.get_u64_le();
18461        __struct.x = buf.get_f32_le();
18462        __struct.y = buf.get_f32_le();
18463        __struct.z = buf.get_f32_le();
18464        __struct.vx = buf.get_f32_le();
18465        __struct.vy = buf.get_f32_le();
18466        __struct.vz = buf.get_f32_le();
18467        __struct.ax = buf.get_f32_le();
18468        __struct.ay = buf.get_f32_le();
18469        __struct.az = buf.get_f32_le();
18470        for v in &mut __struct.covariance {
18471            let val = buf.get_f32_le();
18472            *v = val;
18473        }
18474        let tmp = buf.get_u8();
18475        __struct.estimator_type =
18476            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18477                enum_type: "MavEstimatorType",
18478                value: tmp as u32,
18479            })?;
18480        Ok(__struct)
18481    }
18482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18483        let mut __tmp = BytesMut::new(bytes);
18484        #[allow(clippy::absurd_extreme_comparisons)]
18485        #[allow(unused_comparisons)]
18486        if __tmp.remaining() < Self::ENCODED_LEN {
18487            panic!(
18488                "buffer is too small (need {} bytes, but got {})",
18489                Self::ENCODED_LEN,
18490                __tmp.remaining(),
18491            )
18492        }
18493        __tmp.put_u64_le(self.time_usec);
18494        __tmp.put_f32_le(self.x);
18495        __tmp.put_f32_le(self.y);
18496        __tmp.put_f32_le(self.z);
18497        __tmp.put_f32_le(self.vx);
18498        __tmp.put_f32_le(self.vy);
18499        __tmp.put_f32_le(self.vz);
18500        __tmp.put_f32_le(self.ax);
18501        __tmp.put_f32_le(self.ay);
18502        __tmp.put_f32_le(self.az);
18503        for val in &self.covariance {
18504            __tmp.put_f32_le(*val);
18505        }
18506        __tmp.put_u8(self.estimator_type as u8);
18507        if matches!(version, MavlinkVersion::V2) {
18508            let len = __tmp.len();
18509            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18510        } else {
18511            __tmp.len()
18512        }
18513    }
18514}
18515#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18516#[doc = ""]
18517#[doc = "ID: 89"]
18518#[derive(Debug, Clone, PartialEq)]
18519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18521#[cfg_attr(feature = "ts", derive(TS))]
18522#[cfg_attr(feature = "ts", ts(export))]
18523pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18524    #[doc = "Timestamp (time since system boot)."]
18525    pub time_boot_ms: u32,
18526    #[doc = "X Position"]
18527    pub x: f32,
18528    #[doc = "Y Position"]
18529    pub y: f32,
18530    #[doc = "Z Position"]
18531    pub z: f32,
18532    #[doc = "Roll"]
18533    pub roll: f32,
18534    #[doc = "Pitch"]
18535    pub pitch: f32,
18536    #[doc = "Yaw"]
18537    pub yaw: f32,
18538}
18539impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18540    pub const ENCODED_LEN: usize = 28usize;
18541    pub const DEFAULT: Self = Self {
18542        time_boot_ms: 0_u32,
18543        x: 0.0_f32,
18544        y: 0.0_f32,
18545        z: 0.0_f32,
18546        roll: 0.0_f32,
18547        pitch: 0.0_f32,
18548        yaw: 0.0_f32,
18549    };
18550    #[cfg(feature = "arbitrary")]
18551    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18552        use arbitrary::{Arbitrary, Unstructured};
18553        let mut buf = [0u8; 1024];
18554        rng.fill_bytes(&mut buf);
18555        let mut unstructured = Unstructured::new(&buf);
18556        Self::arbitrary(&mut unstructured).unwrap_or_default()
18557    }
18558}
18559impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18560    fn default() -> Self {
18561        Self::DEFAULT.clone()
18562    }
18563}
18564impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18565    type Message = MavMessage;
18566    const ID: u32 = 89u32;
18567    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18568    const EXTRA_CRC: u8 = 231u8;
18569    const ENCODED_LEN: usize = 28usize;
18570    fn deser(
18571        _version: MavlinkVersion,
18572        __input: &[u8],
18573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18574        let avail_len = __input.len();
18575        let mut payload_buf = [0; Self::ENCODED_LEN];
18576        let mut buf = if avail_len < Self::ENCODED_LEN {
18577            payload_buf[0..avail_len].copy_from_slice(__input);
18578            Bytes::new(&payload_buf)
18579        } else {
18580            Bytes::new(__input)
18581        };
18582        let mut __struct = Self::default();
18583        __struct.time_boot_ms = buf.get_u32_le();
18584        __struct.x = buf.get_f32_le();
18585        __struct.y = buf.get_f32_le();
18586        __struct.z = buf.get_f32_le();
18587        __struct.roll = buf.get_f32_le();
18588        __struct.pitch = buf.get_f32_le();
18589        __struct.yaw = buf.get_f32_le();
18590        Ok(__struct)
18591    }
18592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18593        let mut __tmp = BytesMut::new(bytes);
18594        #[allow(clippy::absurd_extreme_comparisons)]
18595        #[allow(unused_comparisons)]
18596        if __tmp.remaining() < Self::ENCODED_LEN {
18597            panic!(
18598                "buffer is too small (need {} bytes, but got {})",
18599                Self::ENCODED_LEN,
18600                __tmp.remaining(),
18601            )
18602        }
18603        __tmp.put_u32_le(self.time_boot_ms);
18604        __tmp.put_f32_le(self.x);
18605        __tmp.put_f32_le(self.y);
18606        __tmp.put_f32_le(self.z);
18607        __tmp.put_f32_le(self.roll);
18608        __tmp.put_f32_le(self.pitch);
18609        __tmp.put_f32_le(self.yaw);
18610        if matches!(version, MavlinkVersion::V2) {
18611            let len = __tmp.len();
18612            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18613        } else {
18614            __tmp.len()
18615        }
18616    }
18617}
18618#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18619#[doc = ""]
18620#[doc = "ID: 268"]
18621#[derive(Debug, Clone, PartialEq)]
18622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18624#[cfg_attr(feature = "ts", derive(TS))]
18625#[cfg_attr(feature = "ts", ts(export))]
18626pub struct LOGGING_ACK_DATA {
18627    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18628    pub sequence: u16,
18629    #[doc = "system ID of the target"]
18630    pub target_system: u8,
18631    #[doc = "component ID of the target"]
18632    pub target_component: u8,
18633}
18634impl LOGGING_ACK_DATA {
18635    pub const ENCODED_LEN: usize = 4usize;
18636    pub const DEFAULT: Self = Self {
18637        sequence: 0_u16,
18638        target_system: 0_u8,
18639        target_component: 0_u8,
18640    };
18641    #[cfg(feature = "arbitrary")]
18642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18643        use arbitrary::{Arbitrary, Unstructured};
18644        let mut buf = [0u8; 1024];
18645        rng.fill_bytes(&mut buf);
18646        let mut unstructured = Unstructured::new(&buf);
18647        Self::arbitrary(&mut unstructured).unwrap_or_default()
18648    }
18649}
18650impl Default for LOGGING_ACK_DATA {
18651    fn default() -> Self {
18652        Self::DEFAULT.clone()
18653    }
18654}
18655impl MessageData for LOGGING_ACK_DATA {
18656    type Message = MavMessage;
18657    const ID: u32 = 268u32;
18658    const NAME: &'static str = "LOGGING_ACK";
18659    const EXTRA_CRC: u8 = 14u8;
18660    const ENCODED_LEN: usize = 4usize;
18661    fn deser(
18662        _version: MavlinkVersion,
18663        __input: &[u8],
18664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18665        let avail_len = __input.len();
18666        let mut payload_buf = [0; Self::ENCODED_LEN];
18667        let mut buf = if avail_len < Self::ENCODED_LEN {
18668            payload_buf[0..avail_len].copy_from_slice(__input);
18669            Bytes::new(&payload_buf)
18670        } else {
18671            Bytes::new(__input)
18672        };
18673        let mut __struct = Self::default();
18674        __struct.sequence = buf.get_u16_le();
18675        __struct.target_system = buf.get_u8();
18676        __struct.target_component = buf.get_u8();
18677        Ok(__struct)
18678    }
18679    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18680        let mut __tmp = BytesMut::new(bytes);
18681        #[allow(clippy::absurd_extreme_comparisons)]
18682        #[allow(unused_comparisons)]
18683        if __tmp.remaining() < Self::ENCODED_LEN {
18684            panic!(
18685                "buffer is too small (need {} bytes, but got {})",
18686                Self::ENCODED_LEN,
18687                __tmp.remaining(),
18688            )
18689        }
18690        __tmp.put_u16_le(self.sequence);
18691        __tmp.put_u8(self.target_system);
18692        __tmp.put_u8(self.target_component);
18693        if matches!(version, MavlinkVersion::V2) {
18694            let len = __tmp.len();
18695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18696        } else {
18697            __tmp.len()
18698        }
18699    }
18700}
18701#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18702#[doc = ""]
18703#[doc = "ID: 266"]
18704#[derive(Debug, Clone, PartialEq)]
18705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18707#[cfg_attr(feature = "ts", derive(TS))]
18708#[cfg_attr(feature = "ts", ts(export))]
18709pub struct LOGGING_DATA_DATA {
18710    #[doc = "sequence number (can wrap)"]
18711    pub sequence: u16,
18712    #[doc = "system ID of the target"]
18713    pub target_system: u8,
18714    #[doc = "component ID of the target"]
18715    pub target_component: u8,
18716    #[doc = "data length"]
18717    pub length: u8,
18718    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18719    pub first_message_offset: u8,
18720    #[doc = "logged data"]
18721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18722    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18723    pub data: [u8; 249],
18724}
18725impl LOGGING_DATA_DATA {
18726    pub const ENCODED_LEN: usize = 255usize;
18727    pub const DEFAULT: Self = Self {
18728        sequence: 0_u16,
18729        target_system: 0_u8,
18730        target_component: 0_u8,
18731        length: 0_u8,
18732        first_message_offset: 0_u8,
18733        data: [0_u8; 249usize],
18734    };
18735    #[cfg(feature = "arbitrary")]
18736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18737        use arbitrary::{Arbitrary, Unstructured};
18738        let mut buf = [0u8; 1024];
18739        rng.fill_bytes(&mut buf);
18740        let mut unstructured = Unstructured::new(&buf);
18741        Self::arbitrary(&mut unstructured).unwrap_or_default()
18742    }
18743}
18744impl Default for LOGGING_DATA_DATA {
18745    fn default() -> Self {
18746        Self::DEFAULT.clone()
18747    }
18748}
18749impl MessageData for LOGGING_DATA_DATA {
18750    type Message = MavMessage;
18751    const ID: u32 = 266u32;
18752    const NAME: &'static str = "LOGGING_DATA";
18753    const EXTRA_CRC: u8 = 193u8;
18754    const ENCODED_LEN: usize = 255usize;
18755    fn deser(
18756        _version: MavlinkVersion,
18757        __input: &[u8],
18758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18759        let avail_len = __input.len();
18760        let mut payload_buf = [0; Self::ENCODED_LEN];
18761        let mut buf = if avail_len < Self::ENCODED_LEN {
18762            payload_buf[0..avail_len].copy_from_slice(__input);
18763            Bytes::new(&payload_buf)
18764        } else {
18765            Bytes::new(__input)
18766        };
18767        let mut __struct = Self::default();
18768        __struct.sequence = buf.get_u16_le();
18769        __struct.target_system = buf.get_u8();
18770        __struct.target_component = buf.get_u8();
18771        __struct.length = buf.get_u8();
18772        __struct.first_message_offset = buf.get_u8();
18773        for v in &mut __struct.data {
18774            let val = buf.get_u8();
18775            *v = val;
18776        }
18777        Ok(__struct)
18778    }
18779    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18780        let mut __tmp = BytesMut::new(bytes);
18781        #[allow(clippy::absurd_extreme_comparisons)]
18782        #[allow(unused_comparisons)]
18783        if __tmp.remaining() < Self::ENCODED_LEN {
18784            panic!(
18785                "buffer is too small (need {} bytes, but got {})",
18786                Self::ENCODED_LEN,
18787                __tmp.remaining(),
18788            )
18789        }
18790        __tmp.put_u16_le(self.sequence);
18791        __tmp.put_u8(self.target_system);
18792        __tmp.put_u8(self.target_component);
18793        __tmp.put_u8(self.length);
18794        __tmp.put_u8(self.first_message_offset);
18795        for val in &self.data {
18796            __tmp.put_u8(*val);
18797        }
18798        if matches!(version, MavlinkVersion::V2) {
18799            let len = __tmp.len();
18800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18801        } else {
18802            __tmp.len()
18803        }
18804    }
18805}
18806#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18807#[doc = ""]
18808#[doc = "ID: 267"]
18809#[derive(Debug, Clone, PartialEq)]
18810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18812#[cfg_attr(feature = "ts", derive(TS))]
18813#[cfg_attr(feature = "ts", ts(export))]
18814pub struct LOGGING_DATA_ACKED_DATA {
18815    #[doc = "sequence number (can wrap)"]
18816    pub sequence: u16,
18817    #[doc = "system ID of the target"]
18818    pub target_system: u8,
18819    #[doc = "component ID of the target"]
18820    pub target_component: u8,
18821    #[doc = "data length"]
18822    pub length: u8,
18823    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18824    pub first_message_offset: u8,
18825    #[doc = "logged data"]
18826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18827    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18828    pub data: [u8; 249],
18829}
18830impl LOGGING_DATA_ACKED_DATA {
18831    pub const ENCODED_LEN: usize = 255usize;
18832    pub const DEFAULT: Self = Self {
18833        sequence: 0_u16,
18834        target_system: 0_u8,
18835        target_component: 0_u8,
18836        length: 0_u8,
18837        first_message_offset: 0_u8,
18838        data: [0_u8; 249usize],
18839    };
18840    #[cfg(feature = "arbitrary")]
18841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18842        use arbitrary::{Arbitrary, Unstructured};
18843        let mut buf = [0u8; 1024];
18844        rng.fill_bytes(&mut buf);
18845        let mut unstructured = Unstructured::new(&buf);
18846        Self::arbitrary(&mut unstructured).unwrap_or_default()
18847    }
18848}
18849impl Default for LOGGING_DATA_ACKED_DATA {
18850    fn default() -> Self {
18851        Self::DEFAULT.clone()
18852    }
18853}
18854impl MessageData for LOGGING_DATA_ACKED_DATA {
18855    type Message = MavMessage;
18856    const ID: u32 = 267u32;
18857    const NAME: &'static str = "LOGGING_DATA_ACKED";
18858    const EXTRA_CRC: u8 = 35u8;
18859    const ENCODED_LEN: usize = 255usize;
18860    fn deser(
18861        _version: MavlinkVersion,
18862        __input: &[u8],
18863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18864        let avail_len = __input.len();
18865        let mut payload_buf = [0; Self::ENCODED_LEN];
18866        let mut buf = if avail_len < Self::ENCODED_LEN {
18867            payload_buf[0..avail_len].copy_from_slice(__input);
18868            Bytes::new(&payload_buf)
18869        } else {
18870            Bytes::new(__input)
18871        };
18872        let mut __struct = Self::default();
18873        __struct.sequence = buf.get_u16_le();
18874        __struct.target_system = buf.get_u8();
18875        __struct.target_component = buf.get_u8();
18876        __struct.length = buf.get_u8();
18877        __struct.first_message_offset = buf.get_u8();
18878        for v in &mut __struct.data {
18879            let val = buf.get_u8();
18880            *v = val;
18881        }
18882        Ok(__struct)
18883    }
18884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18885        let mut __tmp = BytesMut::new(bytes);
18886        #[allow(clippy::absurd_extreme_comparisons)]
18887        #[allow(unused_comparisons)]
18888        if __tmp.remaining() < Self::ENCODED_LEN {
18889            panic!(
18890                "buffer is too small (need {} bytes, but got {})",
18891                Self::ENCODED_LEN,
18892                __tmp.remaining(),
18893            )
18894        }
18895        __tmp.put_u16_le(self.sequence);
18896        __tmp.put_u8(self.target_system);
18897        __tmp.put_u8(self.target_component);
18898        __tmp.put_u8(self.length);
18899        __tmp.put_u8(self.first_message_offset);
18900        for val in &self.data {
18901            __tmp.put_u8(*val);
18902        }
18903        if matches!(version, MavlinkVersion::V2) {
18904            let len = __tmp.len();
18905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18906        } else {
18907            __tmp.len()
18908        }
18909    }
18910}
18911#[doc = "Reply to LOG_REQUEST_DATA."]
18912#[doc = ""]
18913#[doc = "ID: 120"]
18914#[derive(Debug, Clone, PartialEq)]
18915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18917#[cfg_attr(feature = "ts", derive(TS))]
18918#[cfg_attr(feature = "ts", ts(export))]
18919pub struct LOG_DATA_DATA {
18920    #[doc = "Offset into the log"]
18921    pub ofs: u32,
18922    #[doc = "Log id (from LOG_ENTRY reply)"]
18923    pub id: u16,
18924    #[doc = "Number of bytes (zero for end of log)"]
18925    pub count: u8,
18926    #[doc = "log data"]
18927    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18928    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18929    pub data: [u8; 90],
18930}
18931impl LOG_DATA_DATA {
18932    pub const ENCODED_LEN: usize = 97usize;
18933    pub const DEFAULT: Self = Self {
18934        ofs: 0_u32,
18935        id: 0_u16,
18936        count: 0_u8,
18937        data: [0_u8; 90usize],
18938    };
18939    #[cfg(feature = "arbitrary")]
18940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18941        use arbitrary::{Arbitrary, Unstructured};
18942        let mut buf = [0u8; 1024];
18943        rng.fill_bytes(&mut buf);
18944        let mut unstructured = Unstructured::new(&buf);
18945        Self::arbitrary(&mut unstructured).unwrap_or_default()
18946    }
18947}
18948impl Default for LOG_DATA_DATA {
18949    fn default() -> Self {
18950        Self::DEFAULT.clone()
18951    }
18952}
18953impl MessageData for LOG_DATA_DATA {
18954    type Message = MavMessage;
18955    const ID: u32 = 120u32;
18956    const NAME: &'static str = "LOG_DATA";
18957    const EXTRA_CRC: u8 = 134u8;
18958    const ENCODED_LEN: usize = 97usize;
18959    fn deser(
18960        _version: MavlinkVersion,
18961        __input: &[u8],
18962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18963        let avail_len = __input.len();
18964        let mut payload_buf = [0; Self::ENCODED_LEN];
18965        let mut buf = if avail_len < Self::ENCODED_LEN {
18966            payload_buf[0..avail_len].copy_from_slice(__input);
18967            Bytes::new(&payload_buf)
18968        } else {
18969            Bytes::new(__input)
18970        };
18971        let mut __struct = Self::default();
18972        __struct.ofs = buf.get_u32_le();
18973        __struct.id = buf.get_u16_le();
18974        __struct.count = buf.get_u8();
18975        for v in &mut __struct.data {
18976            let val = buf.get_u8();
18977            *v = val;
18978        }
18979        Ok(__struct)
18980    }
18981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18982        let mut __tmp = BytesMut::new(bytes);
18983        #[allow(clippy::absurd_extreme_comparisons)]
18984        #[allow(unused_comparisons)]
18985        if __tmp.remaining() < Self::ENCODED_LEN {
18986            panic!(
18987                "buffer is too small (need {} bytes, but got {})",
18988                Self::ENCODED_LEN,
18989                __tmp.remaining(),
18990            )
18991        }
18992        __tmp.put_u32_le(self.ofs);
18993        __tmp.put_u16_le(self.id);
18994        __tmp.put_u8(self.count);
18995        for val in &self.data {
18996            __tmp.put_u8(*val);
18997        }
18998        if matches!(version, MavlinkVersion::V2) {
18999            let len = __tmp.len();
19000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19001        } else {
19002            __tmp.len()
19003        }
19004    }
19005}
19006#[doc = "Reply to LOG_REQUEST_LIST."]
19007#[doc = ""]
19008#[doc = "ID: 118"]
19009#[derive(Debug, Clone, PartialEq)]
19010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19012#[cfg_attr(feature = "ts", derive(TS))]
19013#[cfg_attr(feature = "ts", ts(export))]
19014pub struct LOG_ENTRY_DATA {
19015    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19016    pub time_utc: u32,
19017    #[doc = "Size of the log (may be approximate)"]
19018    pub size: u32,
19019    #[doc = "Log id"]
19020    pub id: u16,
19021    #[doc = "Total number of logs"]
19022    pub num_logs: u16,
19023    #[doc = "High log number"]
19024    pub last_log_num: u16,
19025}
19026impl LOG_ENTRY_DATA {
19027    pub const ENCODED_LEN: usize = 14usize;
19028    pub const DEFAULT: Self = Self {
19029        time_utc: 0_u32,
19030        size: 0_u32,
19031        id: 0_u16,
19032        num_logs: 0_u16,
19033        last_log_num: 0_u16,
19034    };
19035    #[cfg(feature = "arbitrary")]
19036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19037        use arbitrary::{Arbitrary, Unstructured};
19038        let mut buf = [0u8; 1024];
19039        rng.fill_bytes(&mut buf);
19040        let mut unstructured = Unstructured::new(&buf);
19041        Self::arbitrary(&mut unstructured).unwrap_or_default()
19042    }
19043}
19044impl Default for LOG_ENTRY_DATA {
19045    fn default() -> Self {
19046        Self::DEFAULT.clone()
19047    }
19048}
19049impl MessageData for LOG_ENTRY_DATA {
19050    type Message = MavMessage;
19051    const ID: u32 = 118u32;
19052    const NAME: &'static str = "LOG_ENTRY";
19053    const EXTRA_CRC: u8 = 56u8;
19054    const ENCODED_LEN: usize = 14usize;
19055    fn deser(
19056        _version: MavlinkVersion,
19057        __input: &[u8],
19058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19059        let avail_len = __input.len();
19060        let mut payload_buf = [0; Self::ENCODED_LEN];
19061        let mut buf = if avail_len < Self::ENCODED_LEN {
19062            payload_buf[0..avail_len].copy_from_slice(__input);
19063            Bytes::new(&payload_buf)
19064        } else {
19065            Bytes::new(__input)
19066        };
19067        let mut __struct = Self::default();
19068        __struct.time_utc = buf.get_u32_le();
19069        __struct.size = buf.get_u32_le();
19070        __struct.id = buf.get_u16_le();
19071        __struct.num_logs = buf.get_u16_le();
19072        __struct.last_log_num = buf.get_u16_le();
19073        Ok(__struct)
19074    }
19075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19076        let mut __tmp = BytesMut::new(bytes);
19077        #[allow(clippy::absurd_extreme_comparisons)]
19078        #[allow(unused_comparisons)]
19079        if __tmp.remaining() < Self::ENCODED_LEN {
19080            panic!(
19081                "buffer is too small (need {} bytes, but got {})",
19082                Self::ENCODED_LEN,
19083                __tmp.remaining(),
19084            )
19085        }
19086        __tmp.put_u32_le(self.time_utc);
19087        __tmp.put_u32_le(self.size);
19088        __tmp.put_u16_le(self.id);
19089        __tmp.put_u16_le(self.num_logs);
19090        __tmp.put_u16_le(self.last_log_num);
19091        if matches!(version, MavlinkVersion::V2) {
19092            let len = __tmp.len();
19093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19094        } else {
19095            __tmp.len()
19096        }
19097    }
19098}
19099#[doc = "Erase all logs."]
19100#[doc = ""]
19101#[doc = "ID: 121"]
19102#[derive(Debug, Clone, PartialEq)]
19103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19105#[cfg_attr(feature = "ts", derive(TS))]
19106#[cfg_attr(feature = "ts", ts(export))]
19107pub struct LOG_ERASE_DATA {
19108    #[doc = "System ID"]
19109    pub target_system: u8,
19110    #[doc = "Component ID"]
19111    pub target_component: u8,
19112}
19113impl LOG_ERASE_DATA {
19114    pub const ENCODED_LEN: usize = 2usize;
19115    pub const DEFAULT: Self = Self {
19116        target_system: 0_u8,
19117        target_component: 0_u8,
19118    };
19119    #[cfg(feature = "arbitrary")]
19120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19121        use arbitrary::{Arbitrary, Unstructured};
19122        let mut buf = [0u8; 1024];
19123        rng.fill_bytes(&mut buf);
19124        let mut unstructured = Unstructured::new(&buf);
19125        Self::arbitrary(&mut unstructured).unwrap_or_default()
19126    }
19127}
19128impl Default for LOG_ERASE_DATA {
19129    fn default() -> Self {
19130        Self::DEFAULT.clone()
19131    }
19132}
19133impl MessageData for LOG_ERASE_DATA {
19134    type Message = MavMessage;
19135    const ID: u32 = 121u32;
19136    const NAME: &'static str = "LOG_ERASE";
19137    const EXTRA_CRC: u8 = 237u8;
19138    const ENCODED_LEN: usize = 2usize;
19139    fn deser(
19140        _version: MavlinkVersion,
19141        __input: &[u8],
19142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19143        let avail_len = __input.len();
19144        let mut payload_buf = [0; Self::ENCODED_LEN];
19145        let mut buf = if avail_len < Self::ENCODED_LEN {
19146            payload_buf[0..avail_len].copy_from_slice(__input);
19147            Bytes::new(&payload_buf)
19148        } else {
19149            Bytes::new(__input)
19150        };
19151        let mut __struct = Self::default();
19152        __struct.target_system = buf.get_u8();
19153        __struct.target_component = buf.get_u8();
19154        Ok(__struct)
19155    }
19156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19157        let mut __tmp = BytesMut::new(bytes);
19158        #[allow(clippy::absurd_extreme_comparisons)]
19159        #[allow(unused_comparisons)]
19160        if __tmp.remaining() < Self::ENCODED_LEN {
19161            panic!(
19162                "buffer is too small (need {} bytes, but got {})",
19163                Self::ENCODED_LEN,
19164                __tmp.remaining(),
19165            )
19166        }
19167        __tmp.put_u8(self.target_system);
19168        __tmp.put_u8(self.target_component);
19169        if matches!(version, MavlinkVersion::V2) {
19170            let len = __tmp.len();
19171            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19172        } else {
19173            __tmp.len()
19174        }
19175    }
19176}
19177#[doc = "Request a chunk of a log."]
19178#[doc = ""]
19179#[doc = "ID: 119"]
19180#[derive(Debug, Clone, PartialEq)]
19181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19183#[cfg_attr(feature = "ts", derive(TS))]
19184#[cfg_attr(feature = "ts", ts(export))]
19185pub struct LOG_REQUEST_DATA_DATA {
19186    #[doc = "Offset into the log"]
19187    pub ofs: u32,
19188    #[doc = "Number of bytes"]
19189    pub count: u32,
19190    #[doc = "Log id (from LOG_ENTRY reply)"]
19191    pub id: u16,
19192    #[doc = "System ID"]
19193    pub target_system: u8,
19194    #[doc = "Component ID"]
19195    pub target_component: u8,
19196}
19197impl LOG_REQUEST_DATA_DATA {
19198    pub const ENCODED_LEN: usize = 12usize;
19199    pub const DEFAULT: Self = Self {
19200        ofs: 0_u32,
19201        count: 0_u32,
19202        id: 0_u16,
19203        target_system: 0_u8,
19204        target_component: 0_u8,
19205    };
19206    #[cfg(feature = "arbitrary")]
19207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19208        use arbitrary::{Arbitrary, Unstructured};
19209        let mut buf = [0u8; 1024];
19210        rng.fill_bytes(&mut buf);
19211        let mut unstructured = Unstructured::new(&buf);
19212        Self::arbitrary(&mut unstructured).unwrap_or_default()
19213    }
19214}
19215impl Default for LOG_REQUEST_DATA_DATA {
19216    fn default() -> Self {
19217        Self::DEFAULT.clone()
19218    }
19219}
19220impl MessageData for LOG_REQUEST_DATA_DATA {
19221    type Message = MavMessage;
19222    const ID: u32 = 119u32;
19223    const NAME: &'static str = "LOG_REQUEST_DATA";
19224    const EXTRA_CRC: u8 = 116u8;
19225    const ENCODED_LEN: usize = 12usize;
19226    fn deser(
19227        _version: MavlinkVersion,
19228        __input: &[u8],
19229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19230        let avail_len = __input.len();
19231        let mut payload_buf = [0; Self::ENCODED_LEN];
19232        let mut buf = if avail_len < Self::ENCODED_LEN {
19233            payload_buf[0..avail_len].copy_from_slice(__input);
19234            Bytes::new(&payload_buf)
19235        } else {
19236            Bytes::new(__input)
19237        };
19238        let mut __struct = Self::default();
19239        __struct.ofs = buf.get_u32_le();
19240        __struct.count = buf.get_u32_le();
19241        __struct.id = buf.get_u16_le();
19242        __struct.target_system = buf.get_u8();
19243        __struct.target_component = buf.get_u8();
19244        Ok(__struct)
19245    }
19246    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19247        let mut __tmp = BytesMut::new(bytes);
19248        #[allow(clippy::absurd_extreme_comparisons)]
19249        #[allow(unused_comparisons)]
19250        if __tmp.remaining() < Self::ENCODED_LEN {
19251            panic!(
19252                "buffer is too small (need {} bytes, but got {})",
19253                Self::ENCODED_LEN,
19254                __tmp.remaining(),
19255            )
19256        }
19257        __tmp.put_u32_le(self.ofs);
19258        __tmp.put_u32_le(self.count);
19259        __tmp.put_u16_le(self.id);
19260        __tmp.put_u8(self.target_system);
19261        __tmp.put_u8(self.target_component);
19262        if matches!(version, MavlinkVersion::V2) {
19263            let len = __tmp.len();
19264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19265        } else {
19266            __tmp.len()
19267        }
19268    }
19269}
19270#[doc = "Stop log transfer and resume normal logging."]
19271#[doc = ""]
19272#[doc = "ID: 122"]
19273#[derive(Debug, Clone, PartialEq)]
19274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19276#[cfg_attr(feature = "ts", derive(TS))]
19277#[cfg_attr(feature = "ts", ts(export))]
19278pub struct LOG_REQUEST_END_DATA {
19279    #[doc = "System ID"]
19280    pub target_system: u8,
19281    #[doc = "Component ID"]
19282    pub target_component: u8,
19283}
19284impl LOG_REQUEST_END_DATA {
19285    pub const ENCODED_LEN: usize = 2usize;
19286    pub const DEFAULT: Self = Self {
19287        target_system: 0_u8,
19288        target_component: 0_u8,
19289    };
19290    #[cfg(feature = "arbitrary")]
19291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19292        use arbitrary::{Arbitrary, Unstructured};
19293        let mut buf = [0u8; 1024];
19294        rng.fill_bytes(&mut buf);
19295        let mut unstructured = Unstructured::new(&buf);
19296        Self::arbitrary(&mut unstructured).unwrap_or_default()
19297    }
19298}
19299impl Default for LOG_REQUEST_END_DATA {
19300    fn default() -> Self {
19301        Self::DEFAULT.clone()
19302    }
19303}
19304impl MessageData for LOG_REQUEST_END_DATA {
19305    type Message = MavMessage;
19306    const ID: u32 = 122u32;
19307    const NAME: &'static str = "LOG_REQUEST_END";
19308    const EXTRA_CRC: u8 = 203u8;
19309    const ENCODED_LEN: usize = 2usize;
19310    fn deser(
19311        _version: MavlinkVersion,
19312        __input: &[u8],
19313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19314        let avail_len = __input.len();
19315        let mut payload_buf = [0; Self::ENCODED_LEN];
19316        let mut buf = if avail_len < Self::ENCODED_LEN {
19317            payload_buf[0..avail_len].copy_from_slice(__input);
19318            Bytes::new(&payload_buf)
19319        } else {
19320            Bytes::new(__input)
19321        };
19322        let mut __struct = Self::default();
19323        __struct.target_system = buf.get_u8();
19324        __struct.target_component = buf.get_u8();
19325        Ok(__struct)
19326    }
19327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19328        let mut __tmp = BytesMut::new(bytes);
19329        #[allow(clippy::absurd_extreme_comparisons)]
19330        #[allow(unused_comparisons)]
19331        if __tmp.remaining() < Self::ENCODED_LEN {
19332            panic!(
19333                "buffer is too small (need {} bytes, but got {})",
19334                Self::ENCODED_LEN,
19335                __tmp.remaining(),
19336            )
19337        }
19338        __tmp.put_u8(self.target_system);
19339        __tmp.put_u8(self.target_component);
19340        if matches!(version, MavlinkVersion::V2) {
19341            let len = __tmp.len();
19342            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19343        } else {
19344            __tmp.len()
19345        }
19346    }
19347}
19348#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19349#[doc = ""]
19350#[doc = "ID: 117"]
19351#[derive(Debug, Clone, PartialEq)]
19352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19354#[cfg_attr(feature = "ts", derive(TS))]
19355#[cfg_attr(feature = "ts", ts(export))]
19356pub struct LOG_REQUEST_LIST_DATA {
19357    #[doc = "First log id (0 for first available)"]
19358    pub start: u16,
19359    #[doc = "Last log id (0xffff for last available)"]
19360    pub end: u16,
19361    #[doc = "System ID"]
19362    pub target_system: u8,
19363    #[doc = "Component ID"]
19364    pub target_component: u8,
19365}
19366impl LOG_REQUEST_LIST_DATA {
19367    pub const ENCODED_LEN: usize = 6usize;
19368    pub const DEFAULT: Self = Self {
19369        start: 0_u16,
19370        end: 0_u16,
19371        target_system: 0_u8,
19372        target_component: 0_u8,
19373    };
19374    #[cfg(feature = "arbitrary")]
19375    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19376        use arbitrary::{Arbitrary, Unstructured};
19377        let mut buf = [0u8; 1024];
19378        rng.fill_bytes(&mut buf);
19379        let mut unstructured = Unstructured::new(&buf);
19380        Self::arbitrary(&mut unstructured).unwrap_or_default()
19381    }
19382}
19383impl Default for LOG_REQUEST_LIST_DATA {
19384    fn default() -> Self {
19385        Self::DEFAULT.clone()
19386    }
19387}
19388impl MessageData for LOG_REQUEST_LIST_DATA {
19389    type Message = MavMessage;
19390    const ID: u32 = 117u32;
19391    const NAME: &'static str = "LOG_REQUEST_LIST";
19392    const EXTRA_CRC: u8 = 128u8;
19393    const ENCODED_LEN: usize = 6usize;
19394    fn deser(
19395        _version: MavlinkVersion,
19396        __input: &[u8],
19397    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19398        let avail_len = __input.len();
19399        let mut payload_buf = [0; Self::ENCODED_LEN];
19400        let mut buf = if avail_len < Self::ENCODED_LEN {
19401            payload_buf[0..avail_len].copy_from_slice(__input);
19402            Bytes::new(&payload_buf)
19403        } else {
19404            Bytes::new(__input)
19405        };
19406        let mut __struct = Self::default();
19407        __struct.start = buf.get_u16_le();
19408        __struct.end = buf.get_u16_le();
19409        __struct.target_system = buf.get_u8();
19410        __struct.target_component = buf.get_u8();
19411        Ok(__struct)
19412    }
19413    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19414        let mut __tmp = BytesMut::new(bytes);
19415        #[allow(clippy::absurd_extreme_comparisons)]
19416        #[allow(unused_comparisons)]
19417        if __tmp.remaining() < Self::ENCODED_LEN {
19418            panic!(
19419                "buffer is too small (need {} bytes, but got {})",
19420                Self::ENCODED_LEN,
19421                __tmp.remaining(),
19422            )
19423        }
19424        __tmp.put_u16_le(self.start);
19425        __tmp.put_u16_le(self.end);
19426        __tmp.put_u8(self.target_system);
19427        __tmp.put_u8(self.target_component);
19428        if matches!(version, MavlinkVersion::V2) {
19429            let len = __tmp.len();
19430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19431        } else {
19432            __tmp.len()
19433        }
19434    }
19435}
19436#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19437#[doc = ""]
19438#[doc = "ID: 192"]
19439#[derive(Debug, Clone, PartialEq)]
19440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19442#[cfg_attr(feature = "ts", derive(TS))]
19443#[cfg_attr(feature = "ts", ts(export))]
19444pub struct MAG_CAL_REPORT_DATA {
19445    #[doc = "RMS milligauss residuals."]
19446    pub fitness: f32,
19447    #[doc = "X offset."]
19448    pub ofs_x: f32,
19449    #[doc = "Y offset."]
19450    pub ofs_y: f32,
19451    #[doc = "Z offset."]
19452    pub ofs_z: f32,
19453    #[doc = "X diagonal (matrix 11)."]
19454    pub diag_x: f32,
19455    #[doc = "Y diagonal (matrix 22)."]
19456    pub diag_y: f32,
19457    #[doc = "Z diagonal (matrix 33)."]
19458    pub diag_z: f32,
19459    #[doc = "X off-diagonal (matrix 12 and 21)."]
19460    pub offdiag_x: f32,
19461    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19462    pub offdiag_y: f32,
19463    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19464    pub offdiag_z: f32,
19465    #[doc = "Compass being calibrated."]
19466    pub compass_id: u8,
19467    #[doc = "Bitmask of compasses being calibrated."]
19468    pub cal_mask: u8,
19469    #[doc = "Calibration Status."]
19470    pub cal_status: MagCalStatus,
19471    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19472    pub autosaved: u8,
19473    #[doc = "Confidence in orientation (higher is better)."]
19474    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19475    pub orientation_confidence: f32,
19476    #[doc = "orientation before calibration."]
19477    #[cfg_attr(feature = "serde", serde(default))]
19478    pub old_orientation: MavSensorOrientation,
19479    #[doc = "orientation after calibration."]
19480    #[cfg_attr(feature = "serde", serde(default))]
19481    pub new_orientation: MavSensorOrientation,
19482    #[doc = "field radius correction factor"]
19483    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19484    pub scale_factor: f32,
19485}
19486impl MAG_CAL_REPORT_DATA {
19487    pub const ENCODED_LEN: usize = 54usize;
19488    pub const DEFAULT: Self = Self {
19489        fitness: 0.0_f32,
19490        ofs_x: 0.0_f32,
19491        ofs_y: 0.0_f32,
19492        ofs_z: 0.0_f32,
19493        diag_x: 0.0_f32,
19494        diag_y: 0.0_f32,
19495        diag_z: 0.0_f32,
19496        offdiag_x: 0.0_f32,
19497        offdiag_y: 0.0_f32,
19498        offdiag_z: 0.0_f32,
19499        compass_id: 0_u8,
19500        cal_mask: 0_u8,
19501        cal_status: MagCalStatus::DEFAULT,
19502        autosaved: 0_u8,
19503        orientation_confidence: 0.0_f32,
19504        old_orientation: MavSensorOrientation::DEFAULT,
19505        new_orientation: MavSensorOrientation::DEFAULT,
19506        scale_factor: 0.0_f32,
19507    };
19508    #[cfg(feature = "arbitrary")]
19509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19510        use arbitrary::{Arbitrary, Unstructured};
19511        let mut buf = [0u8; 1024];
19512        rng.fill_bytes(&mut buf);
19513        let mut unstructured = Unstructured::new(&buf);
19514        Self::arbitrary(&mut unstructured).unwrap_or_default()
19515    }
19516}
19517impl Default for MAG_CAL_REPORT_DATA {
19518    fn default() -> Self {
19519        Self::DEFAULT.clone()
19520    }
19521}
19522impl MessageData for MAG_CAL_REPORT_DATA {
19523    type Message = MavMessage;
19524    const ID: u32 = 192u32;
19525    const NAME: &'static str = "MAG_CAL_REPORT";
19526    const EXTRA_CRC: u8 = 36u8;
19527    const ENCODED_LEN: usize = 54usize;
19528    fn deser(
19529        _version: MavlinkVersion,
19530        __input: &[u8],
19531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19532        let avail_len = __input.len();
19533        let mut payload_buf = [0; Self::ENCODED_LEN];
19534        let mut buf = if avail_len < Self::ENCODED_LEN {
19535            payload_buf[0..avail_len].copy_from_slice(__input);
19536            Bytes::new(&payload_buf)
19537        } else {
19538            Bytes::new(__input)
19539        };
19540        let mut __struct = Self::default();
19541        __struct.fitness = buf.get_f32_le();
19542        __struct.ofs_x = buf.get_f32_le();
19543        __struct.ofs_y = buf.get_f32_le();
19544        __struct.ofs_z = buf.get_f32_le();
19545        __struct.diag_x = buf.get_f32_le();
19546        __struct.diag_y = buf.get_f32_le();
19547        __struct.diag_z = buf.get_f32_le();
19548        __struct.offdiag_x = buf.get_f32_le();
19549        __struct.offdiag_y = buf.get_f32_le();
19550        __struct.offdiag_z = buf.get_f32_le();
19551        __struct.compass_id = buf.get_u8();
19552        __struct.cal_mask = buf.get_u8();
19553        let tmp = buf.get_u8();
19554        __struct.cal_status =
19555            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19556                enum_type: "MagCalStatus",
19557                value: tmp as u32,
19558            })?;
19559        __struct.autosaved = buf.get_u8();
19560        __struct.orientation_confidence = buf.get_f32_le();
19561        let tmp = buf.get_u8();
19562        __struct.old_orientation =
19563            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19564                enum_type: "MavSensorOrientation",
19565                value: tmp as u32,
19566            })?;
19567        let tmp = buf.get_u8();
19568        __struct.new_orientation =
19569            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19570                enum_type: "MavSensorOrientation",
19571                value: tmp as u32,
19572            })?;
19573        __struct.scale_factor = buf.get_f32_le();
19574        Ok(__struct)
19575    }
19576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19577        let mut __tmp = BytesMut::new(bytes);
19578        #[allow(clippy::absurd_extreme_comparisons)]
19579        #[allow(unused_comparisons)]
19580        if __tmp.remaining() < Self::ENCODED_LEN {
19581            panic!(
19582                "buffer is too small (need {} bytes, but got {})",
19583                Self::ENCODED_LEN,
19584                __tmp.remaining(),
19585            )
19586        }
19587        __tmp.put_f32_le(self.fitness);
19588        __tmp.put_f32_le(self.ofs_x);
19589        __tmp.put_f32_le(self.ofs_y);
19590        __tmp.put_f32_le(self.ofs_z);
19591        __tmp.put_f32_le(self.diag_x);
19592        __tmp.put_f32_le(self.diag_y);
19593        __tmp.put_f32_le(self.diag_z);
19594        __tmp.put_f32_le(self.offdiag_x);
19595        __tmp.put_f32_le(self.offdiag_y);
19596        __tmp.put_f32_le(self.offdiag_z);
19597        __tmp.put_u8(self.compass_id);
19598        __tmp.put_u8(self.cal_mask);
19599        __tmp.put_u8(self.cal_status as u8);
19600        __tmp.put_u8(self.autosaved);
19601        if matches!(version, MavlinkVersion::V2) {
19602            __tmp.put_f32_le(self.orientation_confidence);
19603            __tmp.put_u8(self.old_orientation as u8);
19604            __tmp.put_u8(self.new_orientation as u8);
19605            __tmp.put_f32_le(self.scale_factor);
19606            let len = __tmp.len();
19607            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19608        } else {
19609            __tmp.len()
19610        }
19611    }
19612}
19613#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19614#[doc = ""]
19615#[doc = "ID: 69"]
19616#[derive(Debug, Clone, PartialEq)]
19617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19619#[cfg_attr(feature = "ts", derive(TS))]
19620#[cfg_attr(feature = "ts", ts(export))]
19621pub struct MANUAL_CONTROL_DATA {
19622    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19623    pub x: i16,
19624    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19625    pub y: i16,
19626    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19627    pub z: i16,
19628    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19629    pub r: i16,
19630    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19631    pub buttons: u16,
19632    #[doc = "The system to be controlled."]
19633    pub target: u8,
19634    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19635    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19636    pub buttons2: u16,
19637    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19638    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19639    pub enabled_extensions: u8,
19640    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19641    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19642    pub s: i16,
19643    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19644    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19645    pub t: i16,
19646    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19647    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19648    pub aux1: i16,
19649    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19650    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19651    pub aux2: i16,
19652    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19654    pub aux3: i16,
19655    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19657    pub aux4: i16,
19658    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19660    pub aux5: i16,
19661    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19662    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19663    pub aux6: i16,
19664}
19665impl MANUAL_CONTROL_DATA {
19666    pub const ENCODED_LEN: usize = 30usize;
19667    pub const DEFAULT: Self = Self {
19668        x: 0_i16,
19669        y: 0_i16,
19670        z: 0_i16,
19671        r: 0_i16,
19672        buttons: 0_u16,
19673        target: 0_u8,
19674        buttons2: 0_u16,
19675        enabled_extensions: 0_u8,
19676        s: 0_i16,
19677        t: 0_i16,
19678        aux1: 0_i16,
19679        aux2: 0_i16,
19680        aux3: 0_i16,
19681        aux4: 0_i16,
19682        aux5: 0_i16,
19683        aux6: 0_i16,
19684    };
19685    #[cfg(feature = "arbitrary")]
19686    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19687        use arbitrary::{Arbitrary, Unstructured};
19688        let mut buf = [0u8; 1024];
19689        rng.fill_bytes(&mut buf);
19690        let mut unstructured = Unstructured::new(&buf);
19691        Self::arbitrary(&mut unstructured).unwrap_or_default()
19692    }
19693}
19694impl Default for MANUAL_CONTROL_DATA {
19695    fn default() -> Self {
19696        Self::DEFAULT.clone()
19697    }
19698}
19699impl MessageData for MANUAL_CONTROL_DATA {
19700    type Message = MavMessage;
19701    const ID: u32 = 69u32;
19702    const NAME: &'static str = "MANUAL_CONTROL";
19703    const EXTRA_CRC: u8 = 243u8;
19704    const ENCODED_LEN: usize = 30usize;
19705    fn deser(
19706        _version: MavlinkVersion,
19707        __input: &[u8],
19708    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19709        let avail_len = __input.len();
19710        let mut payload_buf = [0; Self::ENCODED_LEN];
19711        let mut buf = if avail_len < Self::ENCODED_LEN {
19712            payload_buf[0..avail_len].copy_from_slice(__input);
19713            Bytes::new(&payload_buf)
19714        } else {
19715            Bytes::new(__input)
19716        };
19717        let mut __struct = Self::default();
19718        __struct.x = buf.get_i16_le();
19719        __struct.y = buf.get_i16_le();
19720        __struct.z = buf.get_i16_le();
19721        __struct.r = buf.get_i16_le();
19722        __struct.buttons = buf.get_u16_le();
19723        __struct.target = buf.get_u8();
19724        __struct.buttons2 = buf.get_u16_le();
19725        __struct.enabled_extensions = buf.get_u8();
19726        __struct.s = buf.get_i16_le();
19727        __struct.t = buf.get_i16_le();
19728        __struct.aux1 = buf.get_i16_le();
19729        __struct.aux2 = buf.get_i16_le();
19730        __struct.aux3 = buf.get_i16_le();
19731        __struct.aux4 = buf.get_i16_le();
19732        __struct.aux5 = buf.get_i16_le();
19733        __struct.aux6 = buf.get_i16_le();
19734        Ok(__struct)
19735    }
19736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19737        let mut __tmp = BytesMut::new(bytes);
19738        #[allow(clippy::absurd_extreme_comparisons)]
19739        #[allow(unused_comparisons)]
19740        if __tmp.remaining() < Self::ENCODED_LEN {
19741            panic!(
19742                "buffer is too small (need {} bytes, but got {})",
19743                Self::ENCODED_LEN,
19744                __tmp.remaining(),
19745            )
19746        }
19747        __tmp.put_i16_le(self.x);
19748        __tmp.put_i16_le(self.y);
19749        __tmp.put_i16_le(self.z);
19750        __tmp.put_i16_le(self.r);
19751        __tmp.put_u16_le(self.buttons);
19752        __tmp.put_u8(self.target);
19753        if matches!(version, MavlinkVersion::V2) {
19754            __tmp.put_u16_le(self.buttons2);
19755            __tmp.put_u8(self.enabled_extensions);
19756            __tmp.put_i16_le(self.s);
19757            __tmp.put_i16_le(self.t);
19758            __tmp.put_i16_le(self.aux1);
19759            __tmp.put_i16_le(self.aux2);
19760            __tmp.put_i16_le(self.aux3);
19761            __tmp.put_i16_le(self.aux4);
19762            __tmp.put_i16_le(self.aux5);
19763            __tmp.put_i16_le(self.aux6);
19764            let len = __tmp.len();
19765            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19766        } else {
19767            __tmp.len()
19768        }
19769    }
19770}
19771#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19772#[doc = ""]
19773#[doc = "ID: 81"]
19774#[derive(Debug, Clone, PartialEq)]
19775#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19776#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19777#[cfg_attr(feature = "ts", derive(TS))]
19778#[cfg_attr(feature = "ts", ts(export))]
19779pub struct MANUAL_SETPOINT_DATA {
19780    #[doc = "Timestamp (time since system boot)."]
19781    pub time_boot_ms: u32,
19782    #[doc = "Desired roll rate"]
19783    pub roll: f32,
19784    #[doc = "Desired pitch rate"]
19785    pub pitch: f32,
19786    #[doc = "Desired yaw rate"]
19787    pub yaw: f32,
19788    #[doc = "Collective thrust, normalized to 0 .. 1"]
19789    pub thrust: f32,
19790    #[doc = "Flight mode switch position, 0.. 255"]
19791    pub mode_switch: u8,
19792    #[doc = "Override mode switch position, 0.. 255"]
19793    pub manual_override_switch: u8,
19794}
19795impl MANUAL_SETPOINT_DATA {
19796    pub const ENCODED_LEN: usize = 22usize;
19797    pub const DEFAULT: Self = Self {
19798        time_boot_ms: 0_u32,
19799        roll: 0.0_f32,
19800        pitch: 0.0_f32,
19801        yaw: 0.0_f32,
19802        thrust: 0.0_f32,
19803        mode_switch: 0_u8,
19804        manual_override_switch: 0_u8,
19805    };
19806    #[cfg(feature = "arbitrary")]
19807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19808        use arbitrary::{Arbitrary, Unstructured};
19809        let mut buf = [0u8; 1024];
19810        rng.fill_bytes(&mut buf);
19811        let mut unstructured = Unstructured::new(&buf);
19812        Self::arbitrary(&mut unstructured).unwrap_or_default()
19813    }
19814}
19815impl Default for MANUAL_SETPOINT_DATA {
19816    fn default() -> Self {
19817        Self::DEFAULT.clone()
19818    }
19819}
19820impl MessageData for MANUAL_SETPOINT_DATA {
19821    type Message = MavMessage;
19822    const ID: u32 = 81u32;
19823    const NAME: &'static str = "MANUAL_SETPOINT";
19824    const EXTRA_CRC: u8 = 106u8;
19825    const ENCODED_LEN: usize = 22usize;
19826    fn deser(
19827        _version: MavlinkVersion,
19828        __input: &[u8],
19829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19830        let avail_len = __input.len();
19831        let mut payload_buf = [0; Self::ENCODED_LEN];
19832        let mut buf = if avail_len < Self::ENCODED_LEN {
19833            payload_buf[0..avail_len].copy_from_slice(__input);
19834            Bytes::new(&payload_buf)
19835        } else {
19836            Bytes::new(__input)
19837        };
19838        let mut __struct = Self::default();
19839        __struct.time_boot_ms = buf.get_u32_le();
19840        __struct.roll = buf.get_f32_le();
19841        __struct.pitch = buf.get_f32_le();
19842        __struct.yaw = buf.get_f32_le();
19843        __struct.thrust = buf.get_f32_le();
19844        __struct.mode_switch = buf.get_u8();
19845        __struct.manual_override_switch = buf.get_u8();
19846        Ok(__struct)
19847    }
19848    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19849        let mut __tmp = BytesMut::new(bytes);
19850        #[allow(clippy::absurd_extreme_comparisons)]
19851        #[allow(unused_comparisons)]
19852        if __tmp.remaining() < Self::ENCODED_LEN {
19853            panic!(
19854                "buffer is too small (need {} bytes, but got {})",
19855                Self::ENCODED_LEN,
19856                __tmp.remaining(),
19857            )
19858        }
19859        __tmp.put_u32_le(self.time_boot_ms);
19860        __tmp.put_f32_le(self.roll);
19861        __tmp.put_f32_le(self.pitch);
19862        __tmp.put_f32_le(self.yaw);
19863        __tmp.put_f32_le(self.thrust);
19864        __tmp.put_u8(self.mode_switch);
19865        __tmp.put_u8(self.manual_override_switch);
19866        if matches!(version, MavlinkVersion::V2) {
19867            let len = __tmp.len();
19868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19869        } else {
19870            __tmp.len()
19871        }
19872    }
19873}
19874#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19875#[doc = ""]
19876#[doc = "ID: 249"]
19877#[derive(Debug, Clone, PartialEq)]
19878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19880#[cfg_attr(feature = "ts", derive(TS))]
19881#[cfg_attr(feature = "ts", ts(export))]
19882pub struct MEMORY_VECT_DATA {
19883    #[doc = "Starting address of the debug variables"]
19884    pub address: u16,
19885    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19886    pub ver: u8,
19887    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19888    pub mavtype: u8,
19889    #[doc = "Memory contents at specified address"]
19890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19891    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19892    pub value: [i8; 32],
19893}
19894impl MEMORY_VECT_DATA {
19895    pub const ENCODED_LEN: usize = 36usize;
19896    pub const DEFAULT: Self = Self {
19897        address: 0_u16,
19898        ver: 0_u8,
19899        mavtype: 0_u8,
19900        value: [0_i8; 32usize],
19901    };
19902    #[cfg(feature = "arbitrary")]
19903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19904        use arbitrary::{Arbitrary, Unstructured};
19905        let mut buf = [0u8; 1024];
19906        rng.fill_bytes(&mut buf);
19907        let mut unstructured = Unstructured::new(&buf);
19908        Self::arbitrary(&mut unstructured).unwrap_or_default()
19909    }
19910}
19911impl Default for MEMORY_VECT_DATA {
19912    fn default() -> Self {
19913        Self::DEFAULT.clone()
19914    }
19915}
19916impl MessageData for MEMORY_VECT_DATA {
19917    type Message = MavMessage;
19918    const ID: u32 = 249u32;
19919    const NAME: &'static str = "MEMORY_VECT";
19920    const EXTRA_CRC: u8 = 204u8;
19921    const ENCODED_LEN: usize = 36usize;
19922    fn deser(
19923        _version: MavlinkVersion,
19924        __input: &[u8],
19925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19926        let avail_len = __input.len();
19927        let mut payload_buf = [0; Self::ENCODED_LEN];
19928        let mut buf = if avail_len < Self::ENCODED_LEN {
19929            payload_buf[0..avail_len].copy_from_slice(__input);
19930            Bytes::new(&payload_buf)
19931        } else {
19932            Bytes::new(__input)
19933        };
19934        let mut __struct = Self::default();
19935        __struct.address = buf.get_u16_le();
19936        __struct.ver = buf.get_u8();
19937        __struct.mavtype = buf.get_u8();
19938        for v in &mut __struct.value {
19939            let val = buf.get_i8();
19940            *v = val;
19941        }
19942        Ok(__struct)
19943    }
19944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19945        let mut __tmp = BytesMut::new(bytes);
19946        #[allow(clippy::absurd_extreme_comparisons)]
19947        #[allow(unused_comparisons)]
19948        if __tmp.remaining() < Self::ENCODED_LEN {
19949            panic!(
19950                "buffer is too small (need {} bytes, but got {})",
19951                Self::ENCODED_LEN,
19952                __tmp.remaining(),
19953            )
19954        }
19955        __tmp.put_u16_le(self.address);
19956        __tmp.put_u8(self.ver);
19957        __tmp.put_u8(self.mavtype);
19958        for val in &self.value {
19959            __tmp.put_i8(*val);
19960        }
19961        if matches!(version, MavlinkVersion::V2) {
19962            let len = __tmp.len();
19963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19964        } else {
19965            __tmp.len()
19966        }
19967    }
19968}
19969#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19970#[doc = ""]
19971#[doc = "ID: 244"]
19972#[derive(Debug, Clone, PartialEq)]
19973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19975#[cfg_attr(feature = "ts", derive(TS))]
19976#[cfg_attr(feature = "ts", ts(export))]
19977pub struct MESSAGE_INTERVAL_DATA {
19978    #[doc = "0 indicates the interval at which it is sent."]
19979    pub interval_us: i32,
19980    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19981    pub message_id: u16,
19982}
19983impl MESSAGE_INTERVAL_DATA {
19984    pub const ENCODED_LEN: usize = 6usize;
19985    pub const DEFAULT: Self = Self {
19986        interval_us: 0_i32,
19987        message_id: 0_u16,
19988    };
19989    #[cfg(feature = "arbitrary")]
19990    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19991        use arbitrary::{Arbitrary, Unstructured};
19992        let mut buf = [0u8; 1024];
19993        rng.fill_bytes(&mut buf);
19994        let mut unstructured = Unstructured::new(&buf);
19995        Self::arbitrary(&mut unstructured).unwrap_or_default()
19996    }
19997}
19998impl Default for MESSAGE_INTERVAL_DATA {
19999    fn default() -> Self {
20000        Self::DEFAULT.clone()
20001    }
20002}
20003impl MessageData for MESSAGE_INTERVAL_DATA {
20004    type Message = MavMessage;
20005    const ID: u32 = 244u32;
20006    const NAME: &'static str = "MESSAGE_INTERVAL";
20007    const EXTRA_CRC: u8 = 95u8;
20008    const ENCODED_LEN: usize = 6usize;
20009    fn deser(
20010        _version: MavlinkVersion,
20011        __input: &[u8],
20012    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20013        let avail_len = __input.len();
20014        let mut payload_buf = [0; Self::ENCODED_LEN];
20015        let mut buf = if avail_len < Self::ENCODED_LEN {
20016            payload_buf[0..avail_len].copy_from_slice(__input);
20017            Bytes::new(&payload_buf)
20018        } else {
20019            Bytes::new(__input)
20020        };
20021        let mut __struct = Self::default();
20022        __struct.interval_us = buf.get_i32_le();
20023        __struct.message_id = buf.get_u16_le();
20024        Ok(__struct)
20025    }
20026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20027        let mut __tmp = BytesMut::new(bytes);
20028        #[allow(clippy::absurd_extreme_comparisons)]
20029        #[allow(unused_comparisons)]
20030        if __tmp.remaining() < Self::ENCODED_LEN {
20031            panic!(
20032                "buffer is too small (need {} bytes, but got {})",
20033                Self::ENCODED_LEN,
20034                __tmp.remaining(),
20035            )
20036        }
20037        __tmp.put_i32_le(self.interval_us);
20038        __tmp.put_u16_le(self.message_id);
20039        if matches!(version, MavlinkVersion::V2) {
20040            let len = __tmp.len();
20041            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20042        } else {
20043            __tmp.len()
20044        }
20045    }
20046}
20047#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20048#[doc = ""]
20049#[doc = "ID: 47"]
20050#[derive(Debug, Clone, PartialEq)]
20051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20053#[cfg_attr(feature = "ts", derive(TS))]
20054#[cfg_attr(feature = "ts", ts(export))]
20055pub struct MISSION_ACK_DATA {
20056    #[doc = "System ID"]
20057    pub target_system: u8,
20058    #[doc = "Component ID"]
20059    pub target_component: u8,
20060    #[doc = "Mission result."]
20061    pub mavtype: MavMissionResult,
20062    #[doc = "Mission type."]
20063    #[cfg_attr(feature = "serde", serde(default))]
20064    pub mission_type: MavMissionType,
20065    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20066    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20067    pub opaque_id: u32,
20068}
20069impl MISSION_ACK_DATA {
20070    pub const ENCODED_LEN: usize = 8usize;
20071    pub const DEFAULT: Self = Self {
20072        target_system: 0_u8,
20073        target_component: 0_u8,
20074        mavtype: MavMissionResult::DEFAULT,
20075        mission_type: MavMissionType::DEFAULT,
20076        opaque_id: 0_u32,
20077    };
20078    #[cfg(feature = "arbitrary")]
20079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20080        use arbitrary::{Arbitrary, Unstructured};
20081        let mut buf = [0u8; 1024];
20082        rng.fill_bytes(&mut buf);
20083        let mut unstructured = Unstructured::new(&buf);
20084        Self::arbitrary(&mut unstructured).unwrap_or_default()
20085    }
20086}
20087impl Default for MISSION_ACK_DATA {
20088    fn default() -> Self {
20089        Self::DEFAULT.clone()
20090    }
20091}
20092impl MessageData for MISSION_ACK_DATA {
20093    type Message = MavMessage;
20094    const ID: u32 = 47u32;
20095    const NAME: &'static str = "MISSION_ACK";
20096    const EXTRA_CRC: u8 = 153u8;
20097    const ENCODED_LEN: usize = 8usize;
20098    fn deser(
20099        _version: MavlinkVersion,
20100        __input: &[u8],
20101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20102        let avail_len = __input.len();
20103        let mut payload_buf = [0; Self::ENCODED_LEN];
20104        let mut buf = if avail_len < Self::ENCODED_LEN {
20105            payload_buf[0..avail_len].copy_from_slice(__input);
20106            Bytes::new(&payload_buf)
20107        } else {
20108            Bytes::new(__input)
20109        };
20110        let mut __struct = Self::default();
20111        __struct.target_system = buf.get_u8();
20112        __struct.target_component = buf.get_u8();
20113        let tmp = buf.get_u8();
20114        __struct.mavtype =
20115            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20116                enum_type: "MavMissionResult",
20117                value: tmp as u32,
20118            })?;
20119        let tmp = buf.get_u8();
20120        __struct.mission_type =
20121            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20122                enum_type: "MavMissionType",
20123                value: tmp as u32,
20124            })?;
20125        __struct.opaque_id = buf.get_u32_le();
20126        Ok(__struct)
20127    }
20128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20129        let mut __tmp = BytesMut::new(bytes);
20130        #[allow(clippy::absurd_extreme_comparisons)]
20131        #[allow(unused_comparisons)]
20132        if __tmp.remaining() < Self::ENCODED_LEN {
20133            panic!(
20134                "buffer is too small (need {} bytes, but got {})",
20135                Self::ENCODED_LEN,
20136                __tmp.remaining(),
20137            )
20138        }
20139        __tmp.put_u8(self.target_system);
20140        __tmp.put_u8(self.target_component);
20141        __tmp.put_u8(self.mavtype as u8);
20142        if matches!(version, MavlinkVersion::V2) {
20143            __tmp.put_u8(self.mission_type as u8);
20144            __tmp.put_u32_le(self.opaque_id);
20145            let len = __tmp.len();
20146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20147        } else {
20148            __tmp.len()
20149        }
20150    }
20151}
20152#[doc = "Delete all mission items at once."]
20153#[doc = ""]
20154#[doc = "ID: 45"]
20155#[derive(Debug, Clone, PartialEq)]
20156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20158#[cfg_attr(feature = "ts", derive(TS))]
20159#[cfg_attr(feature = "ts", ts(export))]
20160pub struct MISSION_CLEAR_ALL_DATA {
20161    #[doc = "System ID"]
20162    pub target_system: u8,
20163    #[doc = "Component ID"]
20164    pub target_component: u8,
20165    #[doc = "Mission type."]
20166    #[cfg_attr(feature = "serde", serde(default))]
20167    pub mission_type: MavMissionType,
20168}
20169impl MISSION_CLEAR_ALL_DATA {
20170    pub const ENCODED_LEN: usize = 3usize;
20171    pub const DEFAULT: Self = Self {
20172        target_system: 0_u8,
20173        target_component: 0_u8,
20174        mission_type: MavMissionType::DEFAULT,
20175    };
20176    #[cfg(feature = "arbitrary")]
20177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20178        use arbitrary::{Arbitrary, Unstructured};
20179        let mut buf = [0u8; 1024];
20180        rng.fill_bytes(&mut buf);
20181        let mut unstructured = Unstructured::new(&buf);
20182        Self::arbitrary(&mut unstructured).unwrap_or_default()
20183    }
20184}
20185impl Default for MISSION_CLEAR_ALL_DATA {
20186    fn default() -> Self {
20187        Self::DEFAULT.clone()
20188    }
20189}
20190impl MessageData for MISSION_CLEAR_ALL_DATA {
20191    type Message = MavMessage;
20192    const ID: u32 = 45u32;
20193    const NAME: &'static str = "MISSION_CLEAR_ALL";
20194    const EXTRA_CRC: u8 = 232u8;
20195    const ENCODED_LEN: usize = 3usize;
20196    fn deser(
20197        _version: MavlinkVersion,
20198        __input: &[u8],
20199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20200        let avail_len = __input.len();
20201        let mut payload_buf = [0; Self::ENCODED_LEN];
20202        let mut buf = if avail_len < Self::ENCODED_LEN {
20203            payload_buf[0..avail_len].copy_from_slice(__input);
20204            Bytes::new(&payload_buf)
20205        } else {
20206            Bytes::new(__input)
20207        };
20208        let mut __struct = Self::default();
20209        __struct.target_system = buf.get_u8();
20210        __struct.target_component = buf.get_u8();
20211        let tmp = buf.get_u8();
20212        __struct.mission_type =
20213            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20214                enum_type: "MavMissionType",
20215                value: tmp as u32,
20216            })?;
20217        Ok(__struct)
20218    }
20219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20220        let mut __tmp = BytesMut::new(bytes);
20221        #[allow(clippy::absurd_extreme_comparisons)]
20222        #[allow(unused_comparisons)]
20223        if __tmp.remaining() < Self::ENCODED_LEN {
20224            panic!(
20225                "buffer is too small (need {} bytes, but got {})",
20226                Self::ENCODED_LEN,
20227                __tmp.remaining(),
20228            )
20229        }
20230        __tmp.put_u8(self.target_system);
20231        __tmp.put_u8(self.target_component);
20232        if matches!(version, MavlinkVersion::V2) {
20233            __tmp.put_u8(self.mission_type as u8);
20234            let len = __tmp.len();
20235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20236        } else {
20237            __tmp.len()
20238        }
20239    }
20240}
20241#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20242#[doc = ""]
20243#[doc = "ID: 44"]
20244#[derive(Debug, Clone, PartialEq)]
20245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20247#[cfg_attr(feature = "ts", derive(TS))]
20248#[cfg_attr(feature = "ts", ts(export))]
20249pub struct MISSION_COUNT_DATA {
20250    #[doc = "Number of mission items in the sequence"]
20251    pub count: u16,
20252    #[doc = "System ID"]
20253    pub target_system: u8,
20254    #[doc = "Component ID"]
20255    pub target_component: u8,
20256    #[doc = "Mission type."]
20257    #[cfg_attr(feature = "serde", serde(default))]
20258    pub mission_type: MavMissionType,
20259    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20260    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20261    pub opaque_id: u32,
20262}
20263impl MISSION_COUNT_DATA {
20264    pub const ENCODED_LEN: usize = 9usize;
20265    pub const DEFAULT: Self = Self {
20266        count: 0_u16,
20267        target_system: 0_u8,
20268        target_component: 0_u8,
20269        mission_type: MavMissionType::DEFAULT,
20270        opaque_id: 0_u32,
20271    };
20272    #[cfg(feature = "arbitrary")]
20273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20274        use arbitrary::{Arbitrary, Unstructured};
20275        let mut buf = [0u8; 1024];
20276        rng.fill_bytes(&mut buf);
20277        let mut unstructured = Unstructured::new(&buf);
20278        Self::arbitrary(&mut unstructured).unwrap_or_default()
20279    }
20280}
20281impl Default for MISSION_COUNT_DATA {
20282    fn default() -> Self {
20283        Self::DEFAULT.clone()
20284    }
20285}
20286impl MessageData for MISSION_COUNT_DATA {
20287    type Message = MavMessage;
20288    const ID: u32 = 44u32;
20289    const NAME: &'static str = "MISSION_COUNT";
20290    const EXTRA_CRC: u8 = 221u8;
20291    const ENCODED_LEN: usize = 9usize;
20292    fn deser(
20293        _version: MavlinkVersion,
20294        __input: &[u8],
20295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20296        let avail_len = __input.len();
20297        let mut payload_buf = [0; Self::ENCODED_LEN];
20298        let mut buf = if avail_len < Self::ENCODED_LEN {
20299            payload_buf[0..avail_len].copy_from_slice(__input);
20300            Bytes::new(&payload_buf)
20301        } else {
20302            Bytes::new(__input)
20303        };
20304        let mut __struct = Self::default();
20305        __struct.count = buf.get_u16_le();
20306        __struct.target_system = buf.get_u8();
20307        __struct.target_component = buf.get_u8();
20308        let tmp = buf.get_u8();
20309        __struct.mission_type =
20310            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20311                enum_type: "MavMissionType",
20312                value: tmp as u32,
20313            })?;
20314        __struct.opaque_id = buf.get_u32_le();
20315        Ok(__struct)
20316    }
20317    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20318        let mut __tmp = BytesMut::new(bytes);
20319        #[allow(clippy::absurd_extreme_comparisons)]
20320        #[allow(unused_comparisons)]
20321        if __tmp.remaining() < Self::ENCODED_LEN {
20322            panic!(
20323                "buffer is too small (need {} bytes, but got {})",
20324                Self::ENCODED_LEN,
20325                __tmp.remaining(),
20326            )
20327        }
20328        __tmp.put_u16_le(self.count);
20329        __tmp.put_u8(self.target_system);
20330        __tmp.put_u8(self.target_component);
20331        if matches!(version, MavlinkVersion::V2) {
20332            __tmp.put_u8(self.mission_type as u8);
20333            __tmp.put_u32_le(self.opaque_id);
20334            let len = __tmp.len();
20335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20336        } else {
20337            __tmp.len()
20338        }
20339    }
20340}
20341#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20342#[doc = ""]
20343#[doc = "ID: 42"]
20344#[derive(Debug, Clone, PartialEq)]
20345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20347#[cfg_attr(feature = "ts", derive(TS))]
20348#[cfg_attr(feature = "ts", ts(export))]
20349pub struct MISSION_CURRENT_DATA {
20350    #[doc = "Sequence"]
20351    pub seq: u16,
20352    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20353    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20354    pub total: u16,
20355    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20356    #[cfg_attr(feature = "serde", serde(default))]
20357    pub mission_state: MissionState,
20358    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20359    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20360    pub mission_mode: u8,
20361    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20362    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20363    pub mission_id: u32,
20364    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20365    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20366    pub fence_id: u32,
20367    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20368    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20369    pub rally_points_id: u32,
20370}
20371impl MISSION_CURRENT_DATA {
20372    pub const ENCODED_LEN: usize = 18usize;
20373    pub const DEFAULT: Self = Self {
20374        seq: 0_u16,
20375        total: 0_u16,
20376        mission_state: MissionState::DEFAULT,
20377        mission_mode: 0_u8,
20378        mission_id: 0_u32,
20379        fence_id: 0_u32,
20380        rally_points_id: 0_u32,
20381    };
20382    #[cfg(feature = "arbitrary")]
20383    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20384        use arbitrary::{Arbitrary, Unstructured};
20385        let mut buf = [0u8; 1024];
20386        rng.fill_bytes(&mut buf);
20387        let mut unstructured = Unstructured::new(&buf);
20388        Self::arbitrary(&mut unstructured).unwrap_or_default()
20389    }
20390}
20391impl Default for MISSION_CURRENT_DATA {
20392    fn default() -> Self {
20393        Self::DEFAULT.clone()
20394    }
20395}
20396impl MessageData for MISSION_CURRENT_DATA {
20397    type Message = MavMessage;
20398    const ID: u32 = 42u32;
20399    const NAME: &'static str = "MISSION_CURRENT";
20400    const EXTRA_CRC: u8 = 28u8;
20401    const ENCODED_LEN: usize = 18usize;
20402    fn deser(
20403        _version: MavlinkVersion,
20404        __input: &[u8],
20405    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20406        let avail_len = __input.len();
20407        let mut payload_buf = [0; Self::ENCODED_LEN];
20408        let mut buf = if avail_len < Self::ENCODED_LEN {
20409            payload_buf[0..avail_len].copy_from_slice(__input);
20410            Bytes::new(&payload_buf)
20411        } else {
20412            Bytes::new(__input)
20413        };
20414        let mut __struct = Self::default();
20415        __struct.seq = buf.get_u16_le();
20416        __struct.total = buf.get_u16_le();
20417        let tmp = buf.get_u8();
20418        __struct.mission_state =
20419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20420                enum_type: "MissionState",
20421                value: tmp as u32,
20422            })?;
20423        __struct.mission_mode = buf.get_u8();
20424        __struct.mission_id = buf.get_u32_le();
20425        __struct.fence_id = buf.get_u32_le();
20426        __struct.rally_points_id = buf.get_u32_le();
20427        Ok(__struct)
20428    }
20429    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20430        let mut __tmp = BytesMut::new(bytes);
20431        #[allow(clippy::absurd_extreme_comparisons)]
20432        #[allow(unused_comparisons)]
20433        if __tmp.remaining() < Self::ENCODED_LEN {
20434            panic!(
20435                "buffer is too small (need {} bytes, but got {})",
20436                Self::ENCODED_LEN,
20437                __tmp.remaining(),
20438            )
20439        }
20440        __tmp.put_u16_le(self.seq);
20441        if matches!(version, MavlinkVersion::V2) {
20442            __tmp.put_u16_le(self.total);
20443            __tmp.put_u8(self.mission_state as u8);
20444            __tmp.put_u8(self.mission_mode);
20445            __tmp.put_u32_le(self.mission_id);
20446            __tmp.put_u32_le(self.fence_id);
20447            __tmp.put_u32_le(self.rally_points_id);
20448            let len = __tmp.len();
20449            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20450        } else {
20451            __tmp.len()
20452        }
20453    }
20454}
20455#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20456#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20457#[doc = ""]
20458#[doc = "ID: 39"]
20459#[derive(Debug, Clone, PartialEq)]
20460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20462#[cfg_attr(feature = "ts", derive(TS))]
20463#[cfg_attr(feature = "ts", ts(export))]
20464pub struct MISSION_ITEM_DATA {
20465    #[doc = "PARAM1, see MAV_CMD enum"]
20466    pub param1: f32,
20467    #[doc = "PARAM2, see MAV_CMD enum"]
20468    pub param2: f32,
20469    #[doc = "PARAM3, see MAV_CMD enum"]
20470    pub param3: f32,
20471    #[doc = "PARAM4, see MAV_CMD enum"]
20472    pub param4: f32,
20473    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20474    pub x: f32,
20475    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20476    pub y: f32,
20477    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20478    pub z: f32,
20479    #[doc = "Sequence"]
20480    pub seq: u16,
20481    #[doc = "The scheduled action for the waypoint."]
20482    pub command: MavCmd,
20483    #[doc = "System ID"]
20484    pub target_system: u8,
20485    #[doc = "Component ID"]
20486    pub target_component: u8,
20487    #[doc = "The coordinate system of the waypoint."]
20488    pub frame: MavFrame,
20489    #[doc = "false:0, true:1"]
20490    pub current: u8,
20491    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20492    pub autocontinue: u8,
20493    #[doc = "Mission type."]
20494    #[cfg_attr(feature = "serde", serde(default))]
20495    pub mission_type: MavMissionType,
20496}
20497impl MISSION_ITEM_DATA {
20498    pub const ENCODED_LEN: usize = 38usize;
20499    pub const DEFAULT: Self = Self {
20500        param1: 0.0_f32,
20501        param2: 0.0_f32,
20502        param3: 0.0_f32,
20503        param4: 0.0_f32,
20504        x: 0.0_f32,
20505        y: 0.0_f32,
20506        z: 0.0_f32,
20507        seq: 0_u16,
20508        command: MavCmd::DEFAULT,
20509        target_system: 0_u8,
20510        target_component: 0_u8,
20511        frame: MavFrame::DEFAULT,
20512        current: 0_u8,
20513        autocontinue: 0_u8,
20514        mission_type: MavMissionType::DEFAULT,
20515    };
20516    #[cfg(feature = "arbitrary")]
20517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20518        use arbitrary::{Arbitrary, Unstructured};
20519        let mut buf = [0u8; 1024];
20520        rng.fill_bytes(&mut buf);
20521        let mut unstructured = Unstructured::new(&buf);
20522        Self::arbitrary(&mut unstructured).unwrap_or_default()
20523    }
20524}
20525impl Default for MISSION_ITEM_DATA {
20526    fn default() -> Self {
20527        Self::DEFAULT.clone()
20528    }
20529}
20530impl MessageData for MISSION_ITEM_DATA {
20531    type Message = MavMessage;
20532    const ID: u32 = 39u32;
20533    const NAME: &'static str = "MISSION_ITEM";
20534    const EXTRA_CRC: u8 = 254u8;
20535    const ENCODED_LEN: usize = 38usize;
20536    fn deser(
20537        _version: MavlinkVersion,
20538        __input: &[u8],
20539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20540        let avail_len = __input.len();
20541        let mut payload_buf = [0; Self::ENCODED_LEN];
20542        let mut buf = if avail_len < Self::ENCODED_LEN {
20543            payload_buf[0..avail_len].copy_from_slice(__input);
20544            Bytes::new(&payload_buf)
20545        } else {
20546            Bytes::new(__input)
20547        };
20548        let mut __struct = Self::default();
20549        __struct.param1 = buf.get_f32_le();
20550        __struct.param2 = buf.get_f32_le();
20551        __struct.param3 = buf.get_f32_le();
20552        __struct.param4 = buf.get_f32_le();
20553        __struct.x = buf.get_f32_le();
20554        __struct.y = buf.get_f32_le();
20555        __struct.z = buf.get_f32_le();
20556        __struct.seq = buf.get_u16_le();
20557        let tmp = buf.get_u16_le();
20558        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20559            ::mavlink_core::error::ParserError::InvalidEnum {
20560                enum_type: "MavCmd",
20561                value: tmp as u32,
20562            },
20563        )?;
20564        __struct.target_system = buf.get_u8();
20565        __struct.target_component = buf.get_u8();
20566        let tmp = buf.get_u8();
20567        __struct.frame =
20568            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20569                enum_type: "MavFrame",
20570                value: tmp as u32,
20571            })?;
20572        __struct.current = buf.get_u8();
20573        __struct.autocontinue = buf.get_u8();
20574        let tmp = buf.get_u8();
20575        __struct.mission_type =
20576            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20577                enum_type: "MavMissionType",
20578                value: tmp as u32,
20579            })?;
20580        Ok(__struct)
20581    }
20582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20583        let mut __tmp = BytesMut::new(bytes);
20584        #[allow(clippy::absurd_extreme_comparisons)]
20585        #[allow(unused_comparisons)]
20586        if __tmp.remaining() < Self::ENCODED_LEN {
20587            panic!(
20588                "buffer is too small (need {} bytes, but got {})",
20589                Self::ENCODED_LEN,
20590                __tmp.remaining(),
20591            )
20592        }
20593        __tmp.put_f32_le(self.param1);
20594        __tmp.put_f32_le(self.param2);
20595        __tmp.put_f32_le(self.param3);
20596        __tmp.put_f32_le(self.param4);
20597        __tmp.put_f32_le(self.x);
20598        __tmp.put_f32_le(self.y);
20599        __tmp.put_f32_le(self.z);
20600        __tmp.put_u16_le(self.seq);
20601        __tmp.put_u16_le(self.command as u16);
20602        __tmp.put_u8(self.target_system);
20603        __tmp.put_u8(self.target_component);
20604        __tmp.put_u8(self.frame as u8);
20605        __tmp.put_u8(self.current);
20606        __tmp.put_u8(self.autocontinue);
20607        if matches!(version, MavlinkVersion::V2) {
20608            __tmp.put_u8(self.mission_type as u8);
20609            let len = __tmp.len();
20610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20611        } else {
20612            __tmp.len()
20613        }
20614    }
20615}
20616#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20617#[doc = ""]
20618#[doc = "ID: 73"]
20619#[derive(Debug, Clone, PartialEq)]
20620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20622#[cfg_attr(feature = "ts", derive(TS))]
20623#[cfg_attr(feature = "ts", ts(export))]
20624pub struct MISSION_ITEM_INT_DATA {
20625    #[doc = "PARAM1, see MAV_CMD enum"]
20626    pub param1: f32,
20627    #[doc = "PARAM2, see MAV_CMD enum"]
20628    pub param2: f32,
20629    #[doc = "PARAM3, see MAV_CMD enum"]
20630    pub param3: f32,
20631    #[doc = "PARAM4, see MAV_CMD enum"]
20632    pub param4: f32,
20633    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20634    pub x: i32,
20635    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20636    pub y: i32,
20637    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20638    pub z: f32,
20639    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20640    pub seq: u16,
20641    #[doc = "The scheduled action for the waypoint."]
20642    pub command: MavCmd,
20643    #[doc = "System ID"]
20644    pub target_system: u8,
20645    #[doc = "Component ID"]
20646    pub target_component: u8,
20647    #[doc = "The coordinate system of the waypoint."]
20648    pub frame: MavFrame,
20649    #[doc = "false:0, true:1"]
20650    pub current: u8,
20651    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20652    pub autocontinue: u8,
20653    #[doc = "Mission type."]
20654    #[cfg_attr(feature = "serde", serde(default))]
20655    pub mission_type: MavMissionType,
20656}
20657impl MISSION_ITEM_INT_DATA {
20658    pub const ENCODED_LEN: usize = 38usize;
20659    pub const DEFAULT: Self = Self {
20660        param1: 0.0_f32,
20661        param2: 0.0_f32,
20662        param3: 0.0_f32,
20663        param4: 0.0_f32,
20664        x: 0_i32,
20665        y: 0_i32,
20666        z: 0.0_f32,
20667        seq: 0_u16,
20668        command: MavCmd::DEFAULT,
20669        target_system: 0_u8,
20670        target_component: 0_u8,
20671        frame: MavFrame::DEFAULT,
20672        current: 0_u8,
20673        autocontinue: 0_u8,
20674        mission_type: MavMissionType::DEFAULT,
20675    };
20676    #[cfg(feature = "arbitrary")]
20677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20678        use arbitrary::{Arbitrary, Unstructured};
20679        let mut buf = [0u8; 1024];
20680        rng.fill_bytes(&mut buf);
20681        let mut unstructured = Unstructured::new(&buf);
20682        Self::arbitrary(&mut unstructured).unwrap_or_default()
20683    }
20684}
20685impl Default for MISSION_ITEM_INT_DATA {
20686    fn default() -> Self {
20687        Self::DEFAULT.clone()
20688    }
20689}
20690impl MessageData for MISSION_ITEM_INT_DATA {
20691    type Message = MavMessage;
20692    const ID: u32 = 73u32;
20693    const NAME: &'static str = "MISSION_ITEM_INT";
20694    const EXTRA_CRC: u8 = 38u8;
20695    const ENCODED_LEN: usize = 38usize;
20696    fn deser(
20697        _version: MavlinkVersion,
20698        __input: &[u8],
20699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20700        let avail_len = __input.len();
20701        let mut payload_buf = [0; Self::ENCODED_LEN];
20702        let mut buf = if avail_len < Self::ENCODED_LEN {
20703            payload_buf[0..avail_len].copy_from_slice(__input);
20704            Bytes::new(&payload_buf)
20705        } else {
20706            Bytes::new(__input)
20707        };
20708        let mut __struct = Self::default();
20709        __struct.param1 = buf.get_f32_le();
20710        __struct.param2 = buf.get_f32_le();
20711        __struct.param3 = buf.get_f32_le();
20712        __struct.param4 = buf.get_f32_le();
20713        __struct.x = buf.get_i32_le();
20714        __struct.y = buf.get_i32_le();
20715        __struct.z = buf.get_f32_le();
20716        __struct.seq = buf.get_u16_le();
20717        let tmp = buf.get_u16_le();
20718        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20719            ::mavlink_core::error::ParserError::InvalidEnum {
20720                enum_type: "MavCmd",
20721                value: tmp as u32,
20722            },
20723        )?;
20724        __struct.target_system = buf.get_u8();
20725        __struct.target_component = buf.get_u8();
20726        let tmp = buf.get_u8();
20727        __struct.frame =
20728            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20729                enum_type: "MavFrame",
20730                value: tmp as u32,
20731            })?;
20732        __struct.current = buf.get_u8();
20733        __struct.autocontinue = buf.get_u8();
20734        let tmp = buf.get_u8();
20735        __struct.mission_type =
20736            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20737                enum_type: "MavMissionType",
20738                value: tmp as u32,
20739            })?;
20740        Ok(__struct)
20741    }
20742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20743        let mut __tmp = BytesMut::new(bytes);
20744        #[allow(clippy::absurd_extreme_comparisons)]
20745        #[allow(unused_comparisons)]
20746        if __tmp.remaining() < Self::ENCODED_LEN {
20747            panic!(
20748                "buffer is too small (need {} bytes, but got {})",
20749                Self::ENCODED_LEN,
20750                __tmp.remaining(),
20751            )
20752        }
20753        __tmp.put_f32_le(self.param1);
20754        __tmp.put_f32_le(self.param2);
20755        __tmp.put_f32_le(self.param3);
20756        __tmp.put_f32_le(self.param4);
20757        __tmp.put_i32_le(self.x);
20758        __tmp.put_i32_le(self.y);
20759        __tmp.put_f32_le(self.z);
20760        __tmp.put_u16_le(self.seq);
20761        __tmp.put_u16_le(self.command as u16);
20762        __tmp.put_u8(self.target_system);
20763        __tmp.put_u8(self.target_component);
20764        __tmp.put_u8(self.frame as u8);
20765        __tmp.put_u8(self.current);
20766        __tmp.put_u8(self.autocontinue);
20767        if matches!(version, MavlinkVersion::V2) {
20768            __tmp.put_u8(self.mission_type as u8);
20769            let len = __tmp.len();
20770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20771        } else {
20772            __tmp.len()
20773        }
20774    }
20775}
20776#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20777#[doc = ""]
20778#[doc = "ID: 46"]
20779#[derive(Debug, Clone, PartialEq)]
20780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20782#[cfg_attr(feature = "ts", derive(TS))]
20783#[cfg_attr(feature = "ts", ts(export))]
20784pub struct MISSION_ITEM_REACHED_DATA {
20785    #[doc = "Sequence"]
20786    pub seq: u16,
20787}
20788impl MISSION_ITEM_REACHED_DATA {
20789    pub const ENCODED_LEN: usize = 2usize;
20790    pub const DEFAULT: Self = Self { seq: 0_u16 };
20791    #[cfg(feature = "arbitrary")]
20792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20793        use arbitrary::{Arbitrary, Unstructured};
20794        let mut buf = [0u8; 1024];
20795        rng.fill_bytes(&mut buf);
20796        let mut unstructured = Unstructured::new(&buf);
20797        Self::arbitrary(&mut unstructured).unwrap_or_default()
20798    }
20799}
20800impl Default for MISSION_ITEM_REACHED_DATA {
20801    fn default() -> Self {
20802        Self::DEFAULT.clone()
20803    }
20804}
20805impl MessageData for MISSION_ITEM_REACHED_DATA {
20806    type Message = MavMessage;
20807    const ID: u32 = 46u32;
20808    const NAME: &'static str = "MISSION_ITEM_REACHED";
20809    const EXTRA_CRC: u8 = 11u8;
20810    const ENCODED_LEN: usize = 2usize;
20811    fn deser(
20812        _version: MavlinkVersion,
20813        __input: &[u8],
20814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20815        let avail_len = __input.len();
20816        let mut payload_buf = [0; Self::ENCODED_LEN];
20817        let mut buf = if avail_len < Self::ENCODED_LEN {
20818            payload_buf[0..avail_len].copy_from_slice(__input);
20819            Bytes::new(&payload_buf)
20820        } else {
20821            Bytes::new(__input)
20822        };
20823        let mut __struct = Self::default();
20824        __struct.seq = buf.get_u16_le();
20825        Ok(__struct)
20826    }
20827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20828        let mut __tmp = BytesMut::new(bytes);
20829        #[allow(clippy::absurd_extreme_comparisons)]
20830        #[allow(unused_comparisons)]
20831        if __tmp.remaining() < Self::ENCODED_LEN {
20832            panic!(
20833                "buffer is too small (need {} bytes, but got {})",
20834                Self::ENCODED_LEN,
20835                __tmp.remaining(),
20836            )
20837        }
20838        __tmp.put_u16_le(self.seq);
20839        if matches!(version, MavlinkVersion::V2) {
20840            let len = __tmp.len();
20841            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20842        } else {
20843            __tmp.len()
20844        }
20845    }
20846}
20847#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20848#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20849#[doc = ""]
20850#[doc = "ID: 40"]
20851#[derive(Debug, Clone, PartialEq)]
20852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20853#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20854#[cfg_attr(feature = "ts", derive(TS))]
20855#[cfg_attr(feature = "ts", ts(export))]
20856pub struct MISSION_REQUEST_DATA {
20857    #[doc = "Sequence"]
20858    pub seq: u16,
20859    #[doc = "System ID"]
20860    pub target_system: u8,
20861    #[doc = "Component ID"]
20862    pub target_component: u8,
20863    #[doc = "Mission type."]
20864    #[cfg_attr(feature = "serde", serde(default))]
20865    pub mission_type: MavMissionType,
20866}
20867impl MISSION_REQUEST_DATA {
20868    pub const ENCODED_LEN: usize = 5usize;
20869    pub const DEFAULT: Self = Self {
20870        seq: 0_u16,
20871        target_system: 0_u8,
20872        target_component: 0_u8,
20873        mission_type: MavMissionType::DEFAULT,
20874    };
20875    #[cfg(feature = "arbitrary")]
20876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20877        use arbitrary::{Arbitrary, Unstructured};
20878        let mut buf = [0u8; 1024];
20879        rng.fill_bytes(&mut buf);
20880        let mut unstructured = Unstructured::new(&buf);
20881        Self::arbitrary(&mut unstructured).unwrap_or_default()
20882    }
20883}
20884impl Default for MISSION_REQUEST_DATA {
20885    fn default() -> Self {
20886        Self::DEFAULT.clone()
20887    }
20888}
20889impl MessageData for MISSION_REQUEST_DATA {
20890    type Message = MavMessage;
20891    const ID: u32 = 40u32;
20892    const NAME: &'static str = "MISSION_REQUEST";
20893    const EXTRA_CRC: u8 = 230u8;
20894    const ENCODED_LEN: usize = 5usize;
20895    fn deser(
20896        _version: MavlinkVersion,
20897        __input: &[u8],
20898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20899        let avail_len = __input.len();
20900        let mut payload_buf = [0; Self::ENCODED_LEN];
20901        let mut buf = if avail_len < Self::ENCODED_LEN {
20902            payload_buf[0..avail_len].copy_from_slice(__input);
20903            Bytes::new(&payload_buf)
20904        } else {
20905            Bytes::new(__input)
20906        };
20907        let mut __struct = Self::default();
20908        __struct.seq = buf.get_u16_le();
20909        __struct.target_system = buf.get_u8();
20910        __struct.target_component = buf.get_u8();
20911        let tmp = buf.get_u8();
20912        __struct.mission_type =
20913            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20914                enum_type: "MavMissionType",
20915                value: tmp as u32,
20916            })?;
20917        Ok(__struct)
20918    }
20919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20920        let mut __tmp = BytesMut::new(bytes);
20921        #[allow(clippy::absurd_extreme_comparisons)]
20922        #[allow(unused_comparisons)]
20923        if __tmp.remaining() < Self::ENCODED_LEN {
20924            panic!(
20925                "buffer is too small (need {} bytes, but got {})",
20926                Self::ENCODED_LEN,
20927                __tmp.remaining(),
20928            )
20929        }
20930        __tmp.put_u16_le(self.seq);
20931        __tmp.put_u8(self.target_system);
20932        __tmp.put_u8(self.target_component);
20933        if matches!(version, MavlinkVersion::V2) {
20934            __tmp.put_u8(self.mission_type as u8);
20935            let len = __tmp.len();
20936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20937        } else {
20938            __tmp.len()
20939        }
20940    }
20941}
20942#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20943#[doc = ""]
20944#[doc = "ID: 51"]
20945#[derive(Debug, Clone, PartialEq)]
20946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20948#[cfg_attr(feature = "ts", derive(TS))]
20949#[cfg_attr(feature = "ts", ts(export))]
20950pub struct MISSION_REQUEST_INT_DATA {
20951    #[doc = "Sequence"]
20952    pub seq: u16,
20953    #[doc = "System ID"]
20954    pub target_system: u8,
20955    #[doc = "Component ID"]
20956    pub target_component: u8,
20957    #[doc = "Mission type."]
20958    #[cfg_attr(feature = "serde", serde(default))]
20959    pub mission_type: MavMissionType,
20960}
20961impl MISSION_REQUEST_INT_DATA {
20962    pub const ENCODED_LEN: usize = 5usize;
20963    pub const DEFAULT: Self = Self {
20964        seq: 0_u16,
20965        target_system: 0_u8,
20966        target_component: 0_u8,
20967        mission_type: MavMissionType::DEFAULT,
20968    };
20969    #[cfg(feature = "arbitrary")]
20970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20971        use arbitrary::{Arbitrary, Unstructured};
20972        let mut buf = [0u8; 1024];
20973        rng.fill_bytes(&mut buf);
20974        let mut unstructured = Unstructured::new(&buf);
20975        Self::arbitrary(&mut unstructured).unwrap_or_default()
20976    }
20977}
20978impl Default for MISSION_REQUEST_INT_DATA {
20979    fn default() -> Self {
20980        Self::DEFAULT.clone()
20981    }
20982}
20983impl MessageData for MISSION_REQUEST_INT_DATA {
20984    type Message = MavMessage;
20985    const ID: u32 = 51u32;
20986    const NAME: &'static str = "MISSION_REQUEST_INT";
20987    const EXTRA_CRC: u8 = 196u8;
20988    const ENCODED_LEN: usize = 5usize;
20989    fn deser(
20990        _version: MavlinkVersion,
20991        __input: &[u8],
20992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20993        let avail_len = __input.len();
20994        let mut payload_buf = [0; Self::ENCODED_LEN];
20995        let mut buf = if avail_len < Self::ENCODED_LEN {
20996            payload_buf[0..avail_len].copy_from_slice(__input);
20997            Bytes::new(&payload_buf)
20998        } else {
20999            Bytes::new(__input)
21000        };
21001        let mut __struct = Self::default();
21002        __struct.seq = buf.get_u16_le();
21003        __struct.target_system = buf.get_u8();
21004        __struct.target_component = buf.get_u8();
21005        let tmp = buf.get_u8();
21006        __struct.mission_type =
21007            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21008                enum_type: "MavMissionType",
21009                value: tmp as u32,
21010            })?;
21011        Ok(__struct)
21012    }
21013    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21014        let mut __tmp = BytesMut::new(bytes);
21015        #[allow(clippy::absurd_extreme_comparisons)]
21016        #[allow(unused_comparisons)]
21017        if __tmp.remaining() < Self::ENCODED_LEN {
21018            panic!(
21019                "buffer is too small (need {} bytes, but got {})",
21020                Self::ENCODED_LEN,
21021                __tmp.remaining(),
21022            )
21023        }
21024        __tmp.put_u16_le(self.seq);
21025        __tmp.put_u8(self.target_system);
21026        __tmp.put_u8(self.target_component);
21027        if matches!(version, MavlinkVersion::V2) {
21028            __tmp.put_u8(self.mission_type as u8);
21029            let len = __tmp.len();
21030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21031        } else {
21032            __tmp.len()
21033        }
21034    }
21035}
21036#[doc = "Request the overall list of mission items from the system/component."]
21037#[doc = ""]
21038#[doc = "ID: 43"]
21039#[derive(Debug, Clone, PartialEq)]
21040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21042#[cfg_attr(feature = "ts", derive(TS))]
21043#[cfg_attr(feature = "ts", ts(export))]
21044pub struct MISSION_REQUEST_LIST_DATA {
21045    #[doc = "System ID"]
21046    pub target_system: u8,
21047    #[doc = "Component ID"]
21048    pub target_component: u8,
21049    #[doc = "Mission type."]
21050    #[cfg_attr(feature = "serde", serde(default))]
21051    pub mission_type: MavMissionType,
21052}
21053impl MISSION_REQUEST_LIST_DATA {
21054    pub const ENCODED_LEN: usize = 3usize;
21055    pub const DEFAULT: Self = Self {
21056        target_system: 0_u8,
21057        target_component: 0_u8,
21058        mission_type: MavMissionType::DEFAULT,
21059    };
21060    #[cfg(feature = "arbitrary")]
21061    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21062        use arbitrary::{Arbitrary, Unstructured};
21063        let mut buf = [0u8; 1024];
21064        rng.fill_bytes(&mut buf);
21065        let mut unstructured = Unstructured::new(&buf);
21066        Self::arbitrary(&mut unstructured).unwrap_or_default()
21067    }
21068}
21069impl Default for MISSION_REQUEST_LIST_DATA {
21070    fn default() -> Self {
21071        Self::DEFAULT.clone()
21072    }
21073}
21074impl MessageData for MISSION_REQUEST_LIST_DATA {
21075    type Message = MavMessage;
21076    const ID: u32 = 43u32;
21077    const NAME: &'static str = "MISSION_REQUEST_LIST";
21078    const EXTRA_CRC: u8 = 132u8;
21079    const ENCODED_LEN: usize = 3usize;
21080    fn deser(
21081        _version: MavlinkVersion,
21082        __input: &[u8],
21083    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21084        let avail_len = __input.len();
21085        let mut payload_buf = [0; Self::ENCODED_LEN];
21086        let mut buf = if avail_len < Self::ENCODED_LEN {
21087            payload_buf[0..avail_len].copy_from_slice(__input);
21088            Bytes::new(&payload_buf)
21089        } else {
21090            Bytes::new(__input)
21091        };
21092        let mut __struct = Self::default();
21093        __struct.target_system = buf.get_u8();
21094        __struct.target_component = buf.get_u8();
21095        let tmp = buf.get_u8();
21096        __struct.mission_type =
21097            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21098                enum_type: "MavMissionType",
21099                value: tmp as u32,
21100            })?;
21101        Ok(__struct)
21102    }
21103    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21104        let mut __tmp = BytesMut::new(bytes);
21105        #[allow(clippy::absurd_extreme_comparisons)]
21106        #[allow(unused_comparisons)]
21107        if __tmp.remaining() < Self::ENCODED_LEN {
21108            panic!(
21109                "buffer is too small (need {} bytes, but got {})",
21110                Self::ENCODED_LEN,
21111                __tmp.remaining(),
21112            )
21113        }
21114        __tmp.put_u8(self.target_system);
21115        __tmp.put_u8(self.target_component);
21116        if matches!(version, MavlinkVersion::V2) {
21117            __tmp.put_u8(self.mission_type as u8);
21118            let len = __tmp.len();
21119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21120        } else {
21121            __tmp.len()
21122        }
21123    }
21124}
21125#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21126#[doc = ""]
21127#[doc = "ID: 37"]
21128#[derive(Debug, Clone, PartialEq)]
21129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21131#[cfg_attr(feature = "ts", derive(TS))]
21132#[cfg_attr(feature = "ts", ts(export))]
21133pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21134    #[doc = "Start index"]
21135    pub start_index: i16,
21136    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21137    pub end_index: i16,
21138    #[doc = "System ID"]
21139    pub target_system: u8,
21140    #[doc = "Component ID"]
21141    pub target_component: u8,
21142    #[doc = "Mission type."]
21143    #[cfg_attr(feature = "serde", serde(default))]
21144    pub mission_type: MavMissionType,
21145}
21146impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21147    pub const ENCODED_LEN: usize = 7usize;
21148    pub const DEFAULT: Self = Self {
21149        start_index: 0_i16,
21150        end_index: 0_i16,
21151        target_system: 0_u8,
21152        target_component: 0_u8,
21153        mission_type: MavMissionType::DEFAULT,
21154    };
21155    #[cfg(feature = "arbitrary")]
21156    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21157        use arbitrary::{Arbitrary, Unstructured};
21158        let mut buf = [0u8; 1024];
21159        rng.fill_bytes(&mut buf);
21160        let mut unstructured = Unstructured::new(&buf);
21161        Self::arbitrary(&mut unstructured).unwrap_or_default()
21162    }
21163}
21164impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21165    fn default() -> Self {
21166        Self::DEFAULT.clone()
21167    }
21168}
21169impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21170    type Message = MavMessage;
21171    const ID: u32 = 37u32;
21172    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21173    const EXTRA_CRC: u8 = 212u8;
21174    const ENCODED_LEN: usize = 7usize;
21175    fn deser(
21176        _version: MavlinkVersion,
21177        __input: &[u8],
21178    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21179        let avail_len = __input.len();
21180        let mut payload_buf = [0; Self::ENCODED_LEN];
21181        let mut buf = if avail_len < Self::ENCODED_LEN {
21182            payload_buf[0..avail_len].copy_from_slice(__input);
21183            Bytes::new(&payload_buf)
21184        } else {
21185            Bytes::new(__input)
21186        };
21187        let mut __struct = Self::default();
21188        __struct.start_index = buf.get_i16_le();
21189        __struct.end_index = buf.get_i16_le();
21190        __struct.target_system = buf.get_u8();
21191        __struct.target_component = buf.get_u8();
21192        let tmp = buf.get_u8();
21193        __struct.mission_type =
21194            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21195                enum_type: "MavMissionType",
21196                value: tmp as u32,
21197            })?;
21198        Ok(__struct)
21199    }
21200    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21201        let mut __tmp = BytesMut::new(bytes);
21202        #[allow(clippy::absurd_extreme_comparisons)]
21203        #[allow(unused_comparisons)]
21204        if __tmp.remaining() < Self::ENCODED_LEN {
21205            panic!(
21206                "buffer is too small (need {} bytes, but got {})",
21207                Self::ENCODED_LEN,
21208                __tmp.remaining(),
21209            )
21210        }
21211        __tmp.put_i16_le(self.start_index);
21212        __tmp.put_i16_le(self.end_index);
21213        __tmp.put_u8(self.target_system);
21214        __tmp.put_u8(self.target_component);
21215        if matches!(version, MavlinkVersion::V2) {
21216            __tmp.put_u8(self.mission_type as u8);
21217            let len = __tmp.len();
21218            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21219        } else {
21220            __tmp.len()
21221        }
21222    }
21223}
21224#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21225#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21226#[doc = ""]
21227#[doc = "ID: 41"]
21228#[derive(Debug, Clone, PartialEq)]
21229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21231#[cfg_attr(feature = "ts", derive(TS))]
21232#[cfg_attr(feature = "ts", ts(export))]
21233pub struct MISSION_SET_CURRENT_DATA {
21234    #[doc = "Sequence"]
21235    pub seq: u16,
21236    #[doc = "System ID"]
21237    pub target_system: u8,
21238    #[doc = "Component ID"]
21239    pub target_component: u8,
21240}
21241impl MISSION_SET_CURRENT_DATA {
21242    pub const ENCODED_LEN: usize = 4usize;
21243    pub const DEFAULT: Self = Self {
21244        seq: 0_u16,
21245        target_system: 0_u8,
21246        target_component: 0_u8,
21247    };
21248    #[cfg(feature = "arbitrary")]
21249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21250        use arbitrary::{Arbitrary, Unstructured};
21251        let mut buf = [0u8; 1024];
21252        rng.fill_bytes(&mut buf);
21253        let mut unstructured = Unstructured::new(&buf);
21254        Self::arbitrary(&mut unstructured).unwrap_or_default()
21255    }
21256}
21257impl Default for MISSION_SET_CURRENT_DATA {
21258    fn default() -> Self {
21259        Self::DEFAULT.clone()
21260    }
21261}
21262impl MessageData for MISSION_SET_CURRENT_DATA {
21263    type Message = MavMessage;
21264    const ID: u32 = 41u32;
21265    const NAME: &'static str = "MISSION_SET_CURRENT";
21266    const EXTRA_CRC: u8 = 28u8;
21267    const ENCODED_LEN: usize = 4usize;
21268    fn deser(
21269        _version: MavlinkVersion,
21270        __input: &[u8],
21271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21272        let avail_len = __input.len();
21273        let mut payload_buf = [0; Self::ENCODED_LEN];
21274        let mut buf = if avail_len < Self::ENCODED_LEN {
21275            payload_buf[0..avail_len].copy_from_slice(__input);
21276            Bytes::new(&payload_buf)
21277        } else {
21278            Bytes::new(__input)
21279        };
21280        let mut __struct = Self::default();
21281        __struct.seq = buf.get_u16_le();
21282        __struct.target_system = buf.get_u8();
21283        __struct.target_component = buf.get_u8();
21284        Ok(__struct)
21285    }
21286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21287        let mut __tmp = BytesMut::new(bytes);
21288        #[allow(clippy::absurd_extreme_comparisons)]
21289        #[allow(unused_comparisons)]
21290        if __tmp.remaining() < Self::ENCODED_LEN {
21291            panic!(
21292                "buffer is too small (need {} bytes, but got {})",
21293                Self::ENCODED_LEN,
21294                __tmp.remaining(),
21295            )
21296        }
21297        __tmp.put_u16_le(self.seq);
21298        __tmp.put_u8(self.target_system);
21299        __tmp.put_u8(self.target_component);
21300        if matches!(version, MavlinkVersion::V2) {
21301            let len = __tmp.len();
21302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21303        } else {
21304            __tmp.len()
21305        }
21306    }
21307}
21308#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21309#[doc = ""]
21310#[doc = "ID: 38"]
21311#[derive(Debug, Clone, PartialEq)]
21312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21314#[cfg_attr(feature = "ts", derive(TS))]
21315#[cfg_attr(feature = "ts", ts(export))]
21316pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21317    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21318    pub start_index: i16,
21319    #[doc = "End index, equal or greater than start index."]
21320    pub end_index: i16,
21321    #[doc = "System ID"]
21322    pub target_system: u8,
21323    #[doc = "Component ID"]
21324    pub target_component: u8,
21325    #[doc = "Mission type."]
21326    #[cfg_attr(feature = "serde", serde(default))]
21327    pub mission_type: MavMissionType,
21328}
21329impl MISSION_WRITE_PARTIAL_LIST_DATA {
21330    pub const ENCODED_LEN: usize = 7usize;
21331    pub const DEFAULT: Self = Self {
21332        start_index: 0_i16,
21333        end_index: 0_i16,
21334        target_system: 0_u8,
21335        target_component: 0_u8,
21336        mission_type: MavMissionType::DEFAULT,
21337    };
21338    #[cfg(feature = "arbitrary")]
21339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21340        use arbitrary::{Arbitrary, Unstructured};
21341        let mut buf = [0u8; 1024];
21342        rng.fill_bytes(&mut buf);
21343        let mut unstructured = Unstructured::new(&buf);
21344        Self::arbitrary(&mut unstructured).unwrap_or_default()
21345    }
21346}
21347impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21348    fn default() -> Self {
21349        Self::DEFAULT.clone()
21350    }
21351}
21352impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21353    type Message = MavMessage;
21354    const ID: u32 = 38u32;
21355    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21356    const EXTRA_CRC: u8 = 9u8;
21357    const ENCODED_LEN: usize = 7usize;
21358    fn deser(
21359        _version: MavlinkVersion,
21360        __input: &[u8],
21361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21362        let avail_len = __input.len();
21363        let mut payload_buf = [0; Self::ENCODED_LEN];
21364        let mut buf = if avail_len < Self::ENCODED_LEN {
21365            payload_buf[0..avail_len].copy_from_slice(__input);
21366            Bytes::new(&payload_buf)
21367        } else {
21368            Bytes::new(__input)
21369        };
21370        let mut __struct = Self::default();
21371        __struct.start_index = buf.get_i16_le();
21372        __struct.end_index = buf.get_i16_le();
21373        __struct.target_system = buf.get_u8();
21374        __struct.target_component = buf.get_u8();
21375        let tmp = buf.get_u8();
21376        __struct.mission_type =
21377            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21378                enum_type: "MavMissionType",
21379                value: tmp as u32,
21380            })?;
21381        Ok(__struct)
21382    }
21383    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21384        let mut __tmp = BytesMut::new(bytes);
21385        #[allow(clippy::absurd_extreme_comparisons)]
21386        #[allow(unused_comparisons)]
21387        if __tmp.remaining() < Self::ENCODED_LEN {
21388            panic!(
21389                "buffer is too small (need {} bytes, but got {})",
21390                Self::ENCODED_LEN,
21391                __tmp.remaining(),
21392            )
21393        }
21394        __tmp.put_i16_le(self.start_index);
21395        __tmp.put_i16_le(self.end_index);
21396        __tmp.put_u8(self.target_system);
21397        __tmp.put_u8(self.target_component);
21398        if matches!(version, MavlinkVersion::V2) {
21399            __tmp.put_u8(self.mission_type as u8);
21400            let len = __tmp.len();
21401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21402        } else {
21403            __tmp.len()
21404        }
21405    }
21406}
21407#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21408#[doc = "Orientation of a mount."]
21409#[doc = ""]
21410#[doc = "ID: 265"]
21411#[derive(Debug, Clone, PartialEq)]
21412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21414#[cfg_attr(feature = "ts", derive(TS))]
21415#[cfg_attr(feature = "ts", ts(export))]
21416pub struct MOUNT_ORIENTATION_DATA {
21417    #[doc = "Timestamp (time since system boot)."]
21418    pub time_boot_ms: u32,
21419    #[doc = "Roll in global frame (set to NaN for invalid)."]
21420    pub roll: f32,
21421    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21422    pub pitch: f32,
21423    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21424    pub yaw: f32,
21425    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21427    pub yaw_absolute: f32,
21428}
21429impl MOUNT_ORIENTATION_DATA {
21430    pub const ENCODED_LEN: usize = 20usize;
21431    pub const DEFAULT: Self = Self {
21432        time_boot_ms: 0_u32,
21433        roll: 0.0_f32,
21434        pitch: 0.0_f32,
21435        yaw: 0.0_f32,
21436        yaw_absolute: 0.0_f32,
21437    };
21438    #[cfg(feature = "arbitrary")]
21439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21440        use arbitrary::{Arbitrary, Unstructured};
21441        let mut buf = [0u8; 1024];
21442        rng.fill_bytes(&mut buf);
21443        let mut unstructured = Unstructured::new(&buf);
21444        Self::arbitrary(&mut unstructured).unwrap_or_default()
21445    }
21446}
21447impl Default for MOUNT_ORIENTATION_DATA {
21448    fn default() -> Self {
21449        Self::DEFAULT.clone()
21450    }
21451}
21452impl MessageData for MOUNT_ORIENTATION_DATA {
21453    type Message = MavMessage;
21454    const ID: u32 = 265u32;
21455    const NAME: &'static str = "MOUNT_ORIENTATION";
21456    const EXTRA_CRC: u8 = 26u8;
21457    const ENCODED_LEN: usize = 20usize;
21458    fn deser(
21459        _version: MavlinkVersion,
21460        __input: &[u8],
21461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21462        let avail_len = __input.len();
21463        let mut payload_buf = [0; Self::ENCODED_LEN];
21464        let mut buf = if avail_len < Self::ENCODED_LEN {
21465            payload_buf[0..avail_len].copy_from_slice(__input);
21466            Bytes::new(&payload_buf)
21467        } else {
21468            Bytes::new(__input)
21469        };
21470        let mut __struct = Self::default();
21471        __struct.time_boot_ms = buf.get_u32_le();
21472        __struct.roll = buf.get_f32_le();
21473        __struct.pitch = buf.get_f32_le();
21474        __struct.yaw = buf.get_f32_le();
21475        __struct.yaw_absolute = buf.get_f32_le();
21476        Ok(__struct)
21477    }
21478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21479        let mut __tmp = BytesMut::new(bytes);
21480        #[allow(clippy::absurd_extreme_comparisons)]
21481        #[allow(unused_comparisons)]
21482        if __tmp.remaining() < Self::ENCODED_LEN {
21483            panic!(
21484                "buffer is too small (need {} bytes, but got {})",
21485                Self::ENCODED_LEN,
21486                __tmp.remaining(),
21487            )
21488        }
21489        __tmp.put_u32_le(self.time_boot_ms);
21490        __tmp.put_f32_le(self.roll);
21491        __tmp.put_f32_le(self.pitch);
21492        __tmp.put_f32_le(self.yaw);
21493        if matches!(version, MavlinkVersion::V2) {
21494            __tmp.put_f32_le(self.yaw_absolute);
21495            let len = __tmp.len();
21496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21497        } else {
21498            __tmp.len()
21499        }
21500    }
21501}
21502#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21503#[doc = ""]
21504#[doc = "ID: 251"]
21505#[derive(Debug, Clone, PartialEq)]
21506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21508#[cfg_attr(feature = "ts", derive(TS))]
21509#[cfg_attr(feature = "ts", ts(export))]
21510pub struct NAMED_VALUE_FLOAT_DATA {
21511    #[doc = "Timestamp (time since system boot)."]
21512    pub time_boot_ms: u32,
21513    #[doc = "Floating point value"]
21514    pub value: f32,
21515    #[doc = "Name of the debug variable"]
21516    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21517    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21518    pub name: [u8; 10],
21519}
21520impl NAMED_VALUE_FLOAT_DATA {
21521    pub const ENCODED_LEN: usize = 18usize;
21522    pub const DEFAULT: Self = Self {
21523        time_boot_ms: 0_u32,
21524        value: 0.0_f32,
21525        name: [0_u8; 10usize],
21526    };
21527    #[cfg(feature = "arbitrary")]
21528    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21529        use arbitrary::{Arbitrary, Unstructured};
21530        let mut buf = [0u8; 1024];
21531        rng.fill_bytes(&mut buf);
21532        let mut unstructured = Unstructured::new(&buf);
21533        Self::arbitrary(&mut unstructured).unwrap_or_default()
21534    }
21535}
21536impl Default for NAMED_VALUE_FLOAT_DATA {
21537    fn default() -> Self {
21538        Self::DEFAULT.clone()
21539    }
21540}
21541impl MessageData for NAMED_VALUE_FLOAT_DATA {
21542    type Message = MavMessage;
21543    const ID: u32 = 251u32;
21544    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21545    const EXTRA_CRC: u8 = 170u8;
21546    const ENCODED_LEN: usize = 18usize;
21547    fn deser(
21548        _version: MavlinkVersion,
21549        __input: &[u8],
21550    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21551        let avail_len = __input.len();
21552        let mut payload_buf = [0; Self::ENCODED_LEN];
21553        let mut buf = if avail_len < Self::ENCODED_LEN {
21554            payload_buf[0..avail_len].copy_from_slice(__input);
21555            Bytes::new(&payload_buf)
21556        } else {
21557            Bytes::new(__input)
21558        };
21559        let mut __struct = Self::default();
21560        __struct.time_boot_ms = buf.get_u32_le();
21561        __struct.value = buf.get_f32_le();
21562        for v in &mut __struct.name {
21563            let val = buf.get_u8();
21564            *v = val;
21565        }
21566        Ok(__struct)
21567    }
21568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21569        let mut __tmp = BytesMut::new(bytes);
21570        #[allow(clippy::absurd_extreme_comparisons)]
21571        #[allow(unused_comparisons)]
21572        if __tmp.remaining() < Self::ENCODED_LEN {
21573            panic!(
21574                "buffer is too small (need {} bytes, but got {})",
21575                Self::ENCODED_LEN,
21576                __tmp.remaining(),
21577            )
21578        }
21579        __tmp.put_u32_le(self.time_boot_ms);
21580        __tmp.put_f32_le(self.value);
21581        for val in &self.name {
21582            __tmp.put_u8(*val);
21583        }
21584        if matches!(version, MavlinkVersion::V2) {
21585            let len = __tmp.len();
21586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21587        } else {
21588            __tmp.len()
21589        }
21590    }
21591}
21592#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21593#[doc = ""]
21594#[doc = "ID: 252"]
21595#[derive(Debug, Clone, PartialEq)]
21596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21598#[cfg_attr(feature = "ts", derive(TS))]
21599#[cfg_attr(feature = "ts", ts(export))]
21600pub struct NAMED_VALUE_INT_DATA {
21601    #[doc = "Timestamp (time since system boot)."]
21602    pub time_boot_ms: u32,
21603    #[doc = "Signed integer value"]
21604    pub value: i32,
21605    #[doc = "Name of the debug variable"]
21606    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21607    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21608    pub name: [u8; 10],
21609}
21610impl NAMED_VALUE_INT_DATA {
21611    pub const ENCODED_LEN: usize = 18usize;
21612    pub const DEFAULT: Self = Self {
21613        time_boot_ms: 0_u32,
21614        value: 0_i32,
21615        name: [0_u8; 10usize],
21616    };
21617    #[cfg(feature = "arbitrary")]
21618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21619        use arbitrary::{Arbitrary, Unstructured};
21620        let mut buf = [0u8; 1024];
21621        rng.fill_bytes(&mut buf);
21622        let mut unstructured = Unstructured::new(&buf);
21623        Self::arbitrary(&mut unstructured).unwrap_or_default()
21624    }
21625}
21626impl Default for NAMED_VALUE_INT_DATA {
21627    fn default() -> Self {
21628        Self::DEFAULT.clone()
21629    }
21630}
21631impl MessageData for NAMED_VALUE_INT_DATA {
21632    type Message = MavMessage;
21633    const ID: u32 = 252u32;
21634    const NAME: &'static str = "NAMED_VALUE_INT";
21635    const EXTRA_CRC: u8 = 44u8;
21636    const ENCODED_LEN: usize = 18usize;
21637    fn deser(
21638        _version: MavlinkVersion,
21639        __input: &[u8],
21640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21641        let avail_len = __input.len();
21642        let mut payload_buf = [0; Self::ENCODED_LEN];
21643        let mut buf = if avail_len < Self::ENCODED_LEN {
21644            payload_buf[0..avail_len].copy_from_slice(__input);
21645            Bytes::new(&payload_buf)
21646        } else {
21647            Bytes::new(__input)
21648        };
21649        let mut __struct = Self::default();
21650        __struct.time_boot_ms = buf.get_u32_le();
21651        __struct.value = buf.get_i32_le();
21652        for v in &mut __struct.name {
21653            let val = buf.get_u8();
21654            *v = val;
21655        }
21656        Ok(__struct)
21657    }
21658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21659        let mut __tmp = BytesMut::new(bytes);
21660        #[allow(clippy::absurd_extreme_comparisons)]
21661        #[allow(unused_comparisons)]
21662        if __tmp.remaining() < Self::ENCODED_LEN {
21663            panic!(
21664                "buffer is too small (need {} bytes, but got {})",
21665                Self::ENCODED_LEN,
21666                __tmp.remaining(),
21667            )
21668        }
21669        __tmp.put_u32_le(self.time_boot_ms);
21670        __tmp.put_i32_le(self.value);
21671        for val in &self.name {
21672            __tmp.put_u8(*val);
21673        }
21674        if matches!(version, MavlinkVersion::V2) {
21675            let len = __tmp.len();
21676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21677        } else {
21678            __tmp.len()
21679        }
21680    }
21681}
21682#[doc = "The state of the navigation and position controller."]
21683#[doc = ""]
21684#[doc = "ID: 62"]
21685#[derive(Debug, Clone, PartialEq)]
21686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21688#[cfg_attr(feature = "ts", derive(TS))]
21689#[cfg_attr(feature = "ts", ts(export))]
21690pub struct NAV_CONTROLLER_OUTPUT_DATA {
21691    #[doc = "Current desired roll"]
21692    pub nav_roll: f32,
21693    #[doc = "Current desired pitch"]
21694    pub nav_pitch: f32,
21695    #[doc = "Current altitude error"]
21696    pub alt_error: f32,
21697    #[doc = "Current airspeed error"]
21698    pub aspd_error: f32,
21699    #[doc = "Current crosstrack error on x-y plane"]
21700    pub xtrack_error: f32,
21701    #[doc = "Current desired heading"]
21702    pub nav_bearing: i16,
21703    #[doc = "Bearing to current waypoint/target"]
21704    pub target_bearing: i16,
21705    #[doc = "Distance to active waypoint"]
21706    pub wp_dist: u16,
21707}
21708impl NAV_CONTROLLER_OUTPUT_DATA {
21709    pub const ENCODED_LEN: usize = 26usize;
21710    pub const DEFAULT: Self = Self {
21711        nav_roll: 0.0_f32,
21712        nav_pitch: 0.0_f32,
21713        alt_error: 0.0_f32,
21714        aspd_error: 0.0_f32,
21715        xtrack_error: 0.0_f32,
21716        nav_bearing: 0_i16,
21717        target_bearing: 0_i16,
21718        wp_dist: 0_u16,
21719    };
21720    #[cfg(feature = "arbitrary")]
21721    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21722        use arbitrary::{Arbitrary, Unstructured};
21723        let mut buf = [0u8; 1024];
21724        rng.fill_bytes(&mut buf);
21725        let mut unstructured = Unstructured::new(&buf);
21726        Self::arbitrary(&mut unstructured).unwrap_or_default()
21727    }
21728}
21729impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21730    fn default() -> Self {
21731        Self::DEFAULT.clone()
21732    }
21733}
21734impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21735    type Message = MavMessage;
21736    const ID: u32 = 62u32;
21737    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21738    const EXTRA_CRC: u8 = 183u8;
21739    const ENCODED_LEN: usize = 26usize;
21740    fn deser(
21741        _version: MavlinkVersion,
21742        __input: &[u8],
21743    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21744        let avail_len = __input.len();
21745        let mut payload_buf = [0; Self::ENCODED_LEN];
21746        let mut buf = if avail_len < Self::ENCODED_LEN {
21747            payload_buf[0..avail_len].copy_from_slice(__input);
21748            Bytes::new(&payload_buf)
21749        } else {
21750            Bytes::new(__input)
21751        };
21752        let mut __struct = Self::default();
21753        __struct.nav_roll = buf.get_f32_le();
21754        __struct.nav_pitch = buf.get_f32_le();
21755        __struct.alt_error = buf.get_f32_le();
21756        __struct.aspd_error = buf.get_f32_le();
21757        __struct.xtrack_error = buf.get_f32_le();
21758        __struct.nav_bearing = buf.get_i16_le();
21759        __struct.target_bearing = buf.get_i16_le();
21760        __struct.wp_dist = buf.get_u16_le();
21761        Ok(__struct)
21762    }
21763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21764        let mut __tmp = BytesMut::new(bytes);
21765        #[allow(clippy::absurd_extreme_comparisons)]
21766        #[allow(unused_comparisons)]
21767        if __tmp.remaining() < Self::ENCODED_LEN {
21768            panic!(
21769                "buffer is too small (need {} bytes, but got {})",
21770                Self::ENCODED_LEN,
21771                __tmp.remaining(),
21772            )
21773        }
21774        __tmp.put_f32_le(self.nav_roll);
21775        __tmp.put_f32_le(self.nav_pitch);
21776        __tmp.put_f32_le(self.alt_error);
21777        __tmp.put_f32_le(self.aspd_error);
21778        __tmp.put_f32_le(self.xtrack_error);
21779        __tmp.put_i16_le(self.nav_bearing);
21780        __tmp.put_i16_le(self.target_bearing);
21781        __tmp.put_u16_le(self.wp_dist);
21782        if matches!(version, MavlinkVersion::V2) {
21783            let len = __tmp.len();
21784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21785        } else {
21786            __tmp.len()
21787        }
21788    }
21789}
21790#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21791#[doc = ""]
21792#[doc = "ID: 330"]
21793#[derive(Debug, Clone, PartialEq)]
21794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21796#[cfg_attr(feature = "ts", derive(TS))]
21797#[cfg_attr(feature = "ts", ts(export))]
21798pub struct OBSTACLE_DISTANCE_DATA {
21799    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21800    pub time_usec: u64,
21801    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21803    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21804    pub distances: [u16; 72],
21805    #[doc = "Minimum distance the sensor can measure."]
21806    pub min_distance: u16,
21807    #[doc = "Maximum distance the sensor can measure."]
21808    pub max_distance: u16,
21809    #[doc = "Class id of the distance sensor type."]
21810    pub sensor_type: MavDistanceSensor,
21811    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21812    pub increment: u8,
21813    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21815    pub increment_f: f32,
21816    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21818    pub angle_offset: f32,
21819    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21820    #[cfg_attr(feature = "serde", serde(default))]
21821    pub frame: MavFrame,
21822}
21823impl OBSTACLE_DISTANCE_DATA {
21824    pub const ENCODED_LEN: usize = 167usize;
21825    pub const DEFAULT: Self = Self {
21826        time_usec: 0_u64,
21827        distances: [0_u16; 72usize],
21828        min_distance: 0_u16,
21829        max_distance: 0_u16,
21830        sensor_type: MavDistanceSensor::DEFAULT,
21831        increment: 0_u8,
21832        increment_f: 0.0_f32,
21833        angle_offset: 0.0_f32,
21834        frame: MavFrame::DEFAULT,
21835    };
21836    #[cfg(feature = "arbitrary")]
21837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21838        use arbitrary::{Arbitrary, Unstructured};
21839        let mut buf = [0u8; 1024];
21840        rng.fill_bytes(&mut buf);
21841        let mut unstructured = Unstructured::new(&buf);
21842        Self::arbitrary(&mut unstructured).unwrap_or_default()
21843    }
21844}
21845impl Default for OBSTACLE_DISTANCE_DATA {
21846    fn default() -> Self {
21847        Self::DEFAULT.clone()
21848    }
21849}
21850impl MessageData for OBSTACLE_DISTANCE_DATA {
21851    type Message = MavMessage;
21852    const ID: u32 = 330u32;
21853    const NAME: &'static str = "OBSTACLE_DISTANCE";
21854    const EXTRA_CRC: u8 = 23u8;
21855    const ENCODED_LEN: usize = 167usize;
21856    fn deser(
21857        _version: MavlinkVersion,
21858        __input: &[u8],
21859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21860        let avail_len = __input.len();
21861        let mut payload_buf = [0; Self::ENCODED_LEN];
21862        let mut buf = if avail_len < Self::ENCODED_LEN {
21863            payload_buf[0..avail_len].copy_from_slice(__input);
21864            Bytes::new(&payload_buf)
21865        } else {
21866            Bytes::new(__input)
21867        };
21868        let mut __struct = Self::default();
21869        __struct.time_usec = buf.get_u64_le();
21870        for v in &mut __struct.distances {
21871            let val = buf.get_u16_le();
21872            *v = val;
21873        }
21874        __struct.min_distance = buf.get_u16_le();
21875        __struct.max_distance = buf.get_u16_le();
21876        let tmp = buf.get_u8();
21877        __struct.sensor_type =
21878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21879                enum_type: "MavDistanceSensor",
21880                value: tmp as u32,
21881            })?;
21882        __struct.increment = buf.get_u8();
21883        __struct.increment_f = buf.get_f32_le();
21884        __struct.angle_offset = buf.get_f32_le();
21885        let tmp = buf.get_u8();
21886        __struct.frame =
21887            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21888                enum_type: "MavFrame",
21889                value: tmp as u32,
21890            })?;
21891        Ok(__struct)
21892    }
21893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21894        let mut __tmp = BytesMut::new(bytes);
21895        #[allow(clippy::absurd_extreme_comparisons)]
21896        #[allow(unused_comparisons)]
21897        if __tmp.remaining() < Self::ENCODED_LEN {
21898            panic!(
21899                "buffer is too small (need {} bytes, but got {})",
21900                Self::ENCODED_LEN,
21901                __tmp.remaining(),
21902            )
21903        }
21904        __tmp.put_u64_le(self.time_usec);
21905        for val in &self.distances {
21906            __tmp.put_u16_le(*val);
21907        }
21908        __tmp.put_u16_le(self.min_distance);
21909        __tmp.put_u16_le(self.max_distance);
21910        __tmp.put_u8(self.sensor_type as u8);
21911        __tmp.put_u8(self.increment);
21912        if matches!(version, MavlinkVersion::V2) {
21913            __tmp.put_f32_le(self.increment_f);
21914            __tmp.put_f32_le(self.angle_offset);
21915            __tmp.put_u8(self.frame as u8);
21916            let len = __tmp.len();
21917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21918        } else {
21919            __tmp.len()
21920        }
21921    }
21922}
21923#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21924#[doc = ""]
21925#[doc = "ID: 331"]
21926#[derive(Debug, Clone, PartialEq)]
21927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21929#[cfg_attr(feature = "ts", derive(TS))]
21930#[cfg_attr(feature = "ts", ts(export))]
21931pub struct ODOMETRY_DATA {
21932    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21933    pub time_usec: u64,
21934    #[doc = "X Position"]
21935    pub x: f32,
21936    #[doc = "Y Position"]
21937    pub y: f32,
21938    #[doc = "Z Position"]
21939    pub z: f32,
21940    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21941    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21942    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21943    pub q: [f32; 4],
21944    #[doc = "X linear speed"]
21945    pub vx: f32,
21946    #[doc = "Y linear speed"]
21947    pub vy: f32,
21948    #[doc = "Z linear speed"]
21949    pub vz: f32,
21950    #[doc = "Roll angular speed"]
21951    pub rollspeed: f32,
21952    #[doc = "Pitch angular speed"]
21953    pub pitchspeed: f32,
21954    #[doc = "Yaw angular speed"]
21955    pub yawspeed: f32,
21956    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21958    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21959    pub pose_covariance: [f32; 21],
21960    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21961    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21962    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21963    pub velocity_covariance: [f32; 21],
21964    #[doc = "Coordinate frame of reference for the pose data."]
21965    pub frame_id: MavFrame,
21966    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21967    pub child_frame_id: MavFrame,
21968    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21969    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21970    pub reset_counter: u8,
21971    #[doc = "Type of estimator that is providing the odometry."]
21972    #[cfg_attr(feature = "serde", serde(default))]
21973    pub estimator_type: MavEstimatorType,
21974    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21975    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21976    pub quality: i8,
21977}
21978impl ODOMETRY_DATA {
21979    pub const ENCODED_LEN: usize = 233usize;
21980    pub const DEFAULT: Self = Self {
21981        time_usec: 0_u64,
21982        x: 0.0_f32,
21983        y: 0.0_f32,
21984        z: 0.0_f32,
21985        q: [0.0_f32; 4usize],
21986        vx: 0.0_f32,
21987        vy: 0.0_f32,
21988        vz: 0.0_f32,
21989        rollspeed: 0.0_f32,
21990        pitchspeed: 0.0_f32,
21991        yawspeed: 0.0_f32,
21992        pose_covariance: [0.0_f32; 21usize],
21993        velocity_covariance: [0.0_f32; 21usize],
21994        frame_id: MavFrame::DEFAULT,
21995        child_frame_id: MavFrame::DEFAULT,
21996        reset_counter: 0_u8,
21997        estimator_type: MavEstimatorType::DEFAULT,
21998        quality: 0_i8,
21999    };
22000    #[cfg(feature = "arbitrary")]
22001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22002        use arbitrary::{Arbitrary, Unstructured};
22003        let mut buf = [0u8; 1024];
22004        rng.fill_bytes(&mut buf);
22005        let mut unstructured = Unstructured::new(&buf);
22006        Self::arbitrary(&mut unstructured).unwrap_or_default()
22007    }
22008}
22009impl Default for ODOMETRY_DATA {
22010    fn default() -> Self {
22011        Self::DEFAULT.clone()
22012    }
22013}
22014impl MessageData for ODOMETRY_DATA {
22015    type Message = MavMessage;
22016    const ID: u32 = 331u32;
22017    const NAME: &'static str = "ODOMETRY";
22018    const EXTRA_CRC: u8 = 91u8;
22019    const ENCODED_LEN: usize = 233usize;
22020    fn deser(
22021        _version: MavlinkVersion,
22022        __input: &[u8],
22023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22024        let avail_len = __input.len();
22025        let mut payload_buf = [0; Self::ENCODED_LEN];
22026        let mut buf = if avail_len < Self::ENCODED_LEN {
22027            payload_buf[0..avail_len].copy_from_slice(__input);
22028            Bytes::new(&payload_buf)
22029        } else {
22030            Bytes::new(__input)
22031        };
22032        let mut __struct = Self::default();
22033        __struct.time_usec = buf.get_u64_le();
22034        __struct.x = buf.get_f32_le();
22035        __struct.y = buf.get_f32_le();
22036        __struct.z = buf.get_f32_le();
22037        for v in &mut __struct.q {
22038            let val = buf.get_f32_le();
22039            *v = val;
22040        }
22041        __struct.vx = buf.get_f32_le();
22042        __struct.vy = buf.get_f32_le();
22043        __struct.vz = buf.get_f32_le();
22044        __struct.rollspeed = buf.get_f32_le();
22045        __struct.pitchspeed = buf.get_f32_le();
22046        __struct.yawspeed = buf.get_f32_le();
22047        for v in &mut __struct.pose_covariance {
22048            let val = buf.get_f32_le();
22049            *v = val;
22050        }
22051        for v in &mut __struct.velocity_covariance {
22052            let val = buf.get_f32_le();
22053            *v = val;
22054        }
22055        let tmp = buf.get_u8();
22056        __struct.frame_id =
22057            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22058                enum_type: "MavFrame",
22059                value: tmp as u32,
22060            })?;
22061        let tmp = buf.get_u8();
22062        __struct.child_frame_id =
22063            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22064                enum_type: "MavFrame",
22065                value: tmp as u32,
22066            })?;
22067        __struct.reset_counter = buf.get_u8();
22068        let tmp = buf.get_u8();
22069        __struct.estimator_type =
22070            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22071                enum_type: "MavEstimatorType",
22072                value: tmp as u32,
22073            })?;
22074        __struct.quality = buf.get_i8();
22075        Ok(__struct)
22076    }
22077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22078        let mut __tmp = BytesMut::new(bytes);
22079        #[allow(clippy::absurd_extreme_comparisons)]
22080        #[allow(unused_comparisons)]
22081        if __tmp.remaining() < Self::ENCODED_LEN {
22082            panic!(
22083                "buffer is too small (need {} bytes, but got {})",
22084                Self::ENCODED_LEN,
22085                __tmp.remaining(),
22086            )
22087        }
22088        __tmp.put_u64_le(self.time_usec);
22089        __tmp.put_f32_le(self.x);
22090        __tmp.put_f32_le(self.y);
22091        __tmp.put_f32_le(self.z);
22092        for val in &self.q {
22093            __tmp.put_f32_le(*val);
22094        }
22095        __tmp.put_f32_le(self.vx);
22096        __tmp.put_f32_le(self.vy);
22097        __tmp.put_f32_le(self.vz);
22098        __tmp.put_f32_le(self.rollspeed);
22099        __tmp.put_f32_le(self.pitchspeed);
22100        __tmp.put_f32_le(self.yawspeed);
22101        for val in &self.pose_covariance {
22102            __tmp.put_f32_le(*val);
22103        }
22104        for val in &self.velocity_covariance {
22105            __tmp.put_f32_le(*val);
22106        }
22107        __tmp.put_u8(self.frame_id as u8);
22108        __tmp.put_u8(self.child_frame_id as u8);
22109        if matches!(version, MavlinkVersion::V2) {
22110            __tmp.put_u8(self.reset_counter);
22111            __tmp.put_u8(self.estimator_type as u8);
22112            __tmp.put_i8(self.quality);
22113            let len = __tmp.len();
22114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22115        } else {
22116            __tmp.len()
22117        }
22118    }
22119}
22120#[doc = "Hardware status sent by an onboard computer."]
22121#[doc = ""]
22122#[doc = "ID: 390"]
22123#[derive(Debug, Clone, PartialEq)]
22124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22126#[cfg_attr(feature = "ts", derive(TS))]
22127#[cfg_attr(feature = "ts", ts(export))]
22128pub struct ONBOARD_COMPUTER_STATUS_DATA {
22129    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22130    pub time_usec: u64,
22131    #[doc = "Time since system boot."]
22132    pub uptime: u32,
22133    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22134    pub ram_usage: u32,
22135    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22136    pub ram_total: u32,
22137    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22138    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22139    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22140    pub storage_type: [u32; 4],
22141    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22142    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22143    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22144    pub storage_usage: [u32; 4],
22145    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22146    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22147    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22148    pub storage_total: [u32; 4],
22149    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22150    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22151    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22152    pub link_type: [u32; 6],
22153    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22154    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22155    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22156    pub link_tx_rate: [u32; 6],
22157    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22158    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22159    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22160    pub link_rx_rate: [u32; 6],
22161    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22162    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22163    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22164    pub link_tx_max: [u32; 6],
22165    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22167    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22168    pub link_rx_max: [u32; 6],
22169    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22170    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22171    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22172    pub fan_speed: [i16; 4],
22173    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22174    pub mavtype: u8,
22175    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22177    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22178    pub cpu_cores: [u8; 8],
22179    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22181    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22182    pub cpu_combined: [u8; 10],
22183    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22184    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22185    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22186    pub gpu_cores: [u8; 4],
22187    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22188    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22189    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22190    pub gpu_combined: [u8; 10],
22191    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22192    pub temperature_board: i8,
22193    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22194    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22195    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22196    pub temperature_core: [i8; 8],
22197}
22198impl ONBOARD_COMPUTER_STATUS_DATA {
22199    pub const ENCODED_LEN: usize = 238usize;
22200    pub const DEFAULT: Self = Self {
22201        time_usec: 0_u64,
22202        uptime: 0_u32,
22203        ram_usage: 0_u32,
22204        ram_total: 0_u32,
22205        storage_type: [0_u32; 4usize],
22206        storage_usage: [0_u32; 4usize],
22207        storage_total: [0_u32; 4usize],
22208        link_type: [0_u32; 6usize],
22209        link_tx_rate: [0_u32; 6usize],
22210        link_rx_rate: [0_u32; 6usize],
22211        link_tx_max: [0_u32; 6usize],
22212        link_rx_max: [0_u32; 6usize],
22213        fan_speed: [0_i16; 4usize],
22214        mavtype: 0_u8,
22215        cpu_cores: [0_u8; 8usize],
22216        cpu_combined: [0_u8; 10usize],
22217        gpu_cores: [0_u8; 4usize],
22218        gpu_combined: [0_u8; 10usize],
22219        temperature_board: 0_i8,
22220        temperature_core: [0_i8; 8usize],
22221    };
22222    #[cfg(feature = "arbitrary")]
22223    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22224        use arbitrary::{Arbitrary, Unstructured};
22225        let mut buf = [0u8; 1024];
22226        rng.fill_bytes(&mut buf);
22227        let mut unstructured = Unstructured::new(&buf);
22228        Self::arbitrary(&mut unstructured).unwrap_or_default()
22229    }
22230}
22231impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22232    fn default() -> Self {
22233        Self::DEFAULT.clone()
22234    }
22235}
22236impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22237    type Message = MavMessage;
22238    const ID: u32 = 390u32;
22239    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22240    const EXTRA_CRC: u8 = 156u8;
22241    const ENCODED_LEN: usize = 238usize;
22242    fn deser(
22243        _version: MavlinkVersion,
22244        __input: &[u8],
22245    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22246        let avail_len = __input.len();
22247        let mut payload_buf = [0; Self::ENCODED_LEN];
22248        let mut buf = if avail_len < Self::ENCODED_LEN {
22249            payload_buf[0..avail_len].copy_from_slice(__input);
22250            Bytes::new(&payload_buf)
22251        } else {
22252            Bytes::new(__input)
22253        };
22254        let mut __struct = Self::default();
22255        __struct.time_usec = buf.get_u64_le();
22256        __struct.uptime = buf.get_u32_le();
22257        __struct.ram_usage = buf.get_u32_le();
22258        __struct.ram_total = buf.get_u32_le();
22259        for v in &mut __struct.storage_type {
22260            let val = buf.get_u32_le();
22261            *v = val;
22262        }
22263        for v in &mut __struct.storage_usage {
22264            let val = buf.get_u32_le();
22265            *v = val;
22266        }
22267        for v in &mut __struct.storage_total {
22268            let val = buf.get_u32_le();
22269            *v = val;
22270        }
22271        for v in &mut __struct.link_type {
22272            let val = buf.get_u32_le();
22273            *v = val;
22274        }
22275        for v in &mut __struct.link_tx_rate {
22276            let val = buf.get_u32_le();
22277            *v = val;
22278        }
22279        for v in &mut __struct.link_rx_rate {
22280            let val = buf.get_u32_le();
22281            *v = val;
22282        }
22283        for v in &mut __struct.link_tx_max {
22284            let val = buf.get_u32_le();
22285            *v = val;
22286        }
22287        for v in &mut __struct.link_rx_max {
22288            let val = buf.get_u32_le();
22289            *v = val;
22290        }
22291        for v in &mut __struct.fan_speed {
22292            let val = buf.get_i16_le();
22293            *v = val;
22294        }
22295        __struct.mavtype = buf.get_u8();
22296        for v in &mut __struct.cpu_cores {
22297            let val = buf.get_u8();
22298            *v = val;
22299        }
22300        for v in &mut __struct.cpu_combined {
22301            let val = buf.get_u8();
22302            *v = val;
22303        }
22304        for v in &mut __struct.gpu_cores {
22305            let val = buf.get_u8();
22306            *v = val;
22307        }
22308        for v in &mut __struct.gpu_combined {
22309            let val = buf.get_u8();
22310            *v = val;
22311        }
22312        __struct.temperature_board = buf.get_i8();
22313        for v in &mut __struct.temperature_core {
22314            let val = buf.get_i8();
22315            *v = val;
22316        }
22317        Ok(__struct)
22318    }
22319    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22320        let mut __tmp = BytesMut::new(bytes);
22321        #[allow(clippy::absurd_extreme_comparisons)]
22322        #[allow(unused_comparisons)]
22323        if __tmp.remaining() < Self::ENCODED_LEN {
22324            panic!(
22325                "buffer is too small (need {} bytes, but got {})",
22326                Self::ENCODED_LEN,
22327                __tmp.remaining(),
22328            )
22329        }
22330        __tmp.put_u64_le(self.time_usec);
22331        __tmp.put_u32_le(self.uptime);
22332        __tmp.put_u32_le(self.ram_usage);
22333        __tmp.put_u32_le(self.ram_total);
22334        for val in &self.storage_type {
22335            __tmp.put_u32_le(*val);
22336        }
22337        for val in &self.storage_usage {
22338            __tmp.put_u32_le(*val);
22339        }
22340        for val in &self.storage_total {
22341            __tmp.put_u32_le(*val);
22342        }
22343        for val in &self.link_type {
22344            __tmp.put_u32_le(*val);
22345        }
22346        for val in &self.link_tx_rate {
22347            __tmp.put_u32_le(*val);
22348        }
22349        for val in &self.link_rx_rate {
22350            __tmp.put_u32_le(*val);
22351        }
22352        for val in &self.link_tx_max {
22353            __tmp.put_u32_le(*val);
22354        }
22355        for val in &self.link_rx_max {
22356            __tmp.put_u32_le(*val);
22357        }
22358        for val in &self.fan_speed {
22359            __tmp.put_i16_le(*val);
22360        }
22361        __tmp.put_u8(self.mavtype);
22362        for val in &self.cpu_cores {
22363            __tmp.put_u8(*val);
22364        }
22365        for val in &self.cpu_combined {
22366            __tmp.put_u8(*val);
22367        }
22368        for val in &self.gpu_cores {
22369            __tmp.put_u8(*val);
22370        }
22371        for val in &self.gpu_combined {
22372            __tmp.put_u8(*val);
22373        }
22374        __tmp.put_i8(self.temperature_board);
22375        for val in &self.temperature_core {
22376            __tmp.put_i8(*val);
22377        }
22378        if matches!(version, MavlinkVersion::V2) {
22379            let len = __tmp.len();
22380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22381        } else {
22382            __tmp.len()
22383        }
22384    }
22385}
22386#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22387#[doc = ""]
22388#[doc = "ID: 12918"]
22389#[derive(Debug, Clone, PartialEq)]
22390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22392#[cfg_attr(feature = "ts", derive(TS))]
22393#[cfg_attr(feature = "ts", ts(export))]
22394pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22395    #[doc = "Status level indicating if arming is allowed."]
22396    pub status: MavOdidArmStatus,
22397    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22398    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22399    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22400    pub error: [u8; 50],
22401}
22402impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22403    pub const ENCODED_LEN: usize = 51usize;
22404    pub const DEFAULT: Self = Self {
22405        status: MavOdidArmStatus::DEFAULT,
22406        error: [0_u8; 50usize],
22407    };
22408    #[cfg(feature = "arbitrary")]
22409    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22410        use arbitrary::{Arbitrary, Unstructured};
22411        let mut buf = [0u8; 1024];
22412        rng.fill_bytes(&mut buf);
22413        let mut unstructured = Unstructured::new(&buf);
22414        Self::arbitrary(&mut unstructured).unwrap_or_default()
22415    }
22416}
22417impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22418    fn default() -> Self {
22419        Self::DEFAULT.clone()
22420    }
22421}
22422impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22423    type Message = MavMessage;
22424    const ID: u32 = 12918u32;
22425    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22426    const EXTRA_CRC: u8 = 139u8;
22427    const ENCODED_LEN: usize = 51usize;
22428    fn deser(
22429        _version: MavlinkVersion,
22430        __input: &[u8],
22431    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22432        let avail_len = __input.len();
22433        let mut payload_buf = [0; Self::ENCODED_LEN];
22434        let mut buf = if avail_len < Self::ENCODED_LEN {
22435            payload_buf[0..avail_len].copy_from_slice(__input);
22436            Bytes::new(&payload_buf)
22437        } else {
22438            Bytes::new(__input)
22439        };
22440        let mut __struct = Self::default();
22441        let tmp = buf.get_u8();
22442        __struct.status =
22443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22444                enum_type: "MavOdidArmStatus",
22445                value: tmp as u32,
22446            })?;
22447        for v in &mut __struct.error {
22448            let val = buf.get_u8();
22449            *v = val;
22450        }
22451        Ok(__struct)
22452    }
22453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22454        let mut __tmp = BytesMut::new(bytes);
22455        #[allow(clippy::absurd_extreme_comparisons)]
22456        #[allow(unused_comparisons)]
22457        if __tmp.remaining() < Self::ENCODED_LEN {
22458            panic!(
22459                "buffer is too small (need {} bytes, but got {})",
22460                Self::ENCODED_LEN,
22461                __tmp.remaining(),
22462            )
22463        }
22464        __tmp.put_u8(self.status as u8);
22465        for val in &self.error {
22466            __tmp.put_u8(*val);
22467        }
22468        if matches!(version, MavlinkVersion::V2) {
22469            let len = __tmp.len();
22470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22471        } else {
22472            __tmp.len()
22473        }
22474    }
22475}
22476#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22477#[doc = ""]
22478#[doc = "ID: 12902"]
22479#[derive(Debug, Clone, PartialEq)]
22480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22482#[cfg_attr(feature = "ts", derive(TS))]
22483#[cfg_attr(feature = "ts", ts(export))]
22484pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22485    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22486    pub timestamp: u32,
22487    #[doc = "System ID (0 for broadcast)."]
22488    pub target_system: u8,
22489    #[doc = "Component ID (0 for broadcast)."]
22490    pub target_component: u8,
22491    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22492    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22493    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22494    pub id_or_mac: [u8; 20],
22495    #[doc = "Indicates the type of authentication."]
22496    pub authentication_type: MavOdidAuthType,
22497    #[doc = "Allowed range is 0 - 15."]
22498    pub data_page: u8,
22499    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22500    pub last_page_index: u8,
22501    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22502    pub length: u8,
22503    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22504    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22505    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22506    pub authentication_data: [u8; 23],
22507}
22508impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22509    pub const ENCODED_LEN: usize = 53usize;
22510    pub const DEFAULT: Self = Self {
22511        timestamp: 0_u32,
22512        target_system: 0_u8,
22513        target_component: 0_u8,
22514        id_or_mac: [0_u8; 20usize],
22515        authentication_type: MavOdidAuthType::DEFAULT,
22516        data_page: 0_u8,
22517        last_page_index: 0_u8,
22518        length: 0_u8,
22519        authentication_data: [0_u8; 23usize],
22520    };
22521    #[cfg(feature = "arbitrary")]
22522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22523        use arbitrary::{Arbitrary, Unstructured};
22524        let mut buf = [0u8; 1024];
22525        rng.fill_bytes(&mut buf);
22526        let mut unstructured = Unstructured::new(&buf);
22527        Self::arbitrary(&mut unstructured).unwrap_or_default()
22528    }
22529}
22530impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22531    fn default() -> Self {
22532        Self::DEFAULT.clone()
22533    }
22534}
22535impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22536    type Message = MavMessage;
22537    const ID: u32 = 12902u32;
22538    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22539    const EXTRA_CRC: u8 = 140u8;
22540    const ENCODED_LEN: usize = 53usize;
22541    fn deser(
22542        _version: MavlinkVersion,
22543        __input: &[u8],
22544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22545        let avail_len = __input.len();
22546        let mut payload_buf = [0; Self::ENCODED_LEN];
22547        let mut buf = if avail_len < Self::ENCODED_LEN {
22548            payload_buf[0..avail_len].copy_from_slice(__input);
22549            Bytes::new(&payload_buf)
22550        } else {
22551            Bytes::new(__input)
22552        };
22553        let mut __struct = Self::default();
22554        __struct.timestamp = buf.get_u32_le();
22555        __struct.target_system = buf.get_u8();
22556        __struct.target_component = buf.get_u8();
22557        for v in &mut __struct.id_or_mac {
22558            let val = buf.get_u8();
22559            *v = val;
22560        }
22561        let tmp = buf.get_u8();
22562        __struct.authentication_type =
22563            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22564                enum_type: "MavOdidAuthType",
22565                value: tmp as u32,
22566            })?;
22567        __struct.data_page = buf.get_u8();
22568        __struct.last_page_index = buf.get_u8();
22569        __struct.length = buf.get_u8();
22570        for v in &mut __struct.authentication_data {
22571            let val = buf.get_u8();
22572            *v = val;
22573        }
22574        Ok(__struct)
22575    }
22576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22577        let mut __tmp = BytesMut::new(bytes);
22578        #[allow(clippy::absurd_extreme_comparisons)]
22579        #[allow(unused_comparisons)]
22580        if __tmp.remaining() < Self::ENCODED_LEN {
22581            panic!(
22582                "buffer is too small (need {} bytes, but got {})",
22583                Self::ENCODED_LEN,
22584                __tmp.remaining(),
22585            )
22586        }
22587        __tmp.put_u32_le(self.timestamp);
22588        __tmp.put_u8(self.target_system);
22589        __tmp.put_u8(self.target_component);
22590        for val in &self.id_or_mac {
22591            __tmp.put_u8(*val);
22592        }
22593        __tmp.put_u8(self.authentication_type as u8);
22594        __tmp.put_u8(self.data_page);
22595        __tmp.put_u8(self.last_page_index);
22596        __tmp.put_u8(self.length);
22597        for val in &self.authentication_data {
22598            __tmp.put_u8(*val);
22599        }
22600        if matches!(version, MavlinkVersion::V2) {
22601            let len = __tmp.len();
22602            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22603        } else {
22604            __tmp.len()
22605        }
22606    }
22607}
22608#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22609#[doc = ""]
22610#[doc = "ID: 12900"]
22611#[derive(Debug, Clone, PartialEq)]
22612#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22613#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22614#[cfg_attr(feature = "ts", derive(TS))]
22615#[cfg_attr(feature = "ts", ts(export))]
22616pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22617    #[doc = "System ID (0 for broadcast)."]
22618    pub target_system: u8,
22619    #[doc = "Component ID (0 for broadcast)."]
22620    pub target_component: u8,
22621    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22622    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22623    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22624    pub id_or_mac: [u8; 20],
22625    #[doc = "Indicates the format for the uas_id field of this message."]
22626    pub id_type: MavOdidIdType,
22627    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22628    pub ua_type: MavOdidUaType,
22629    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22630    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22631    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22632    pub uas_id: [u8; 20],
22633}
22634impl OPEN_DRONE_ID_BASIC_ID_DATA {
22635    pub const ENCODED_LEN: usize = 44usize;
22636    pub const DEFAULT: Self = Self {
22637        target_system: 0_u8,
22638        target_component: 0_u8,
22639        id_or_mac: [0_u8; 20usize],
22640        id_type: MavOdidIdType::DEFAULT,
22641        ua_type: MavOdidUaType::DEFAULT,
22642        uas_id: [0_u8; 20usize],
22643    };
22644    #[cfg(feature = "arbitrary")]
22645    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22646        use arbitrary::{Arbitrary, Unstructured};
22647        let mut buf = [0u8; 1024];
22648        rng.fill_bytes(&mut buf);
22649        let mut unstructured = Unstructured::new(&buf);
22650        Self::arbitrary(&mut unstructured).unwrap_or_default()
22651    }
22652}
22653impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22654    fn default() -> Self {
22655        Self::DEFAULT.clone()
22656    }
22657}
22658impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22659    type Message = MavMessage;
22660    const ID: u32 = 12900u32;
22661    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22662    const EXTRA_CRC: u8 = 114u8;
22663    const ENCODED_LEN: usize = 44usize;
22664    fn deser(
22665        _version: MavlinkVersion,
22666        __input: &[u8],
22667    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22668        let avail_len = __input.len();
22669        let mut payload_buf = [0; Self::ENCODED_LEN];
22670        let mut buf = if avail_len < Self::ENCODED_LEN {
22671            payload_buf[0..avail_len].copy_from_slice(__input);
22672            Bytes::new(&payload_buf)
22673        } else {
22674            Bytes::new(__input)
22675        };
22676        let mut __struct = Self::default();
22677        __struct.target_system = buf.get_u8();
22678        __struct.target_component = buf.get_u8();
22679        for v in &mut __struct.id_or_mac {
22680            let val = buf.get_u8();
22681            *v = val;
22682        }
22683        let tmp = buf.get_u8();
22684        __struct.id_type =
22685            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22686                enum_type: "MavOdidIdType",
22687                value: tmp as u32,
22688            })?;
22689        let tmp = buf.get_u8();
22690        __struct.ua_type =
22691            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22692                enum_type: "MavOdidUaType",
22693                value: tmp as u32,
22694            })?;
22695        for v in &mut __struct.uas_id {
22696            let val = buf.get_u8();
22697            *v = val;
22698        }
22699        Ok(__struct)
22700    }
22701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22702        let mut __tmp = BytesMut::new(bytes);
22703        #[allow(clippy::absurd_extreme_comparisons)]
22704        #[allow(unused_comparisons)]
22705        if __tmp.remaining() < Self::ENCODED_LEN {
22706            panic!(
22707                "buffer is too small (need {} bytes, but got {})",
22708                Self::ENCODED_LEN,
22709                __tmp.remaining(),
22710            )
22711        }
22712        __tmp.put_u8(self.target_system);
22713        __tmp.put_u8(self.target_component);
22714        for val in &self.id_or_mac {
22715            __tmp.put_u8(*val);
22716        }
22717        __tmp.put_u8(self.id_type as u8);
22718        __tmp.put_u8(self.ua_type as u8);
22719        for val in &self.uas_id {
22720            __tmp.put_u8(*val);
22721        }
22722        if matches!(version, MavlinkVersion::V2) {
22723            let len = __tmp.len();
22724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22725        } else {
22726            __tmp.len()
22727        }
22728    }
22729}
22730#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22731#[doc = ""]
22732#[doc = "ID: 12901"]
22733#[derive(Debug, Clone, PartialEq)]
22734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22736#[cfg_attr(feature = "ts", derive(TS))]
22737#[cfg_attr(feature = "ts", ts(export))]
22738pub struct OPEN_DRONE_ID_LOCATION_DATA {
22739    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22740    pub latitude: i32,
22741    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22742    pub longitude: i32,
22743    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22744    pub altitude_barometric: f32,
22745    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22746    pub altitude_geodetic: f32,
22747    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22748    pub height: f32,
22749    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22750    pub timestamp: f32,
22751    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22752    pub direction: u16,
22753    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22754    pub speed_horizontal: u16,
22755    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22756    pub speed_vertical: i16,
22757    #[doc = "System ID (0 for broadcast)."]
22758    pub target_system: u8,
22759    #[doc = "Component ID (0 for broadcast)."]
22760    pub target_component: u8,
22761    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22763    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22764    pub id_or_mac: [u8; 20],
22765    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22766    pub status: MavOdidStatus,
22767    #[doc = "Indicates the reference point for the height field."]
22768    pub height_reference: MavOdidHeightRef,
22769    #[doc = "The accuracy of the horizontal position."]
22770    pub horizontal_accuracy: MavOdidHorAcc,
22771    #[doc = "The accuracy of the vertical position."]
22772    pub vertical_accuracy: MavOdidVerAcc,
22773    #[doc = "The accuracy of the barometric altitude."]
22774    pub barometer_accuracy: MavOdidVerAcc,
22775    #[doc = "The accuracy of the horizontal and vertical speed."]
22776    pub speed_accuracy: MavOdidSpeedAcc,
22777    #[doc = "The accuracy of the timestamps."]
22778    pub timestamp_accuracy: MavOdidTimeAcc,
22779}
22780impl OPEN_DRONE_ID_LOCATION_DATA {
22781    pub const ENCODED_LEN: usize = 59usize;
22782    pub const DEFAULT: Self = Self {
22783        latitude: 0_i32,
22784        longitude: 0_i32,
22785        altitude_barometric: 0.0_f32,
22786        altitude_geodetic: 0.0_f32,
22787        height: 0.0_f32,
22788        timestamp: 0.0_f32,
22789        direction: 0_u16,
22790        speed_horizontal: 0_u16,
22791        speed_vertical: 0_i16,
22792        target_system: 0_u8,
22793        target_component: 0_u8,
22794        id_or_mac: [0_u8; 20usize],
22795        status: MavOdidStatus::DEFAULT,
22796        height_reference: MavOdidHeightRef::DEFAULT,
22797        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22798        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22799        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22800        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22801        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22802    };
22803    #[cfg(feature = "arbitrary")]
22804    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22805        use arbitrary::{Arbitrary, Unstructured};
22806        let mut buf = [0u8; 1024];
22807        rng.fill_bytes(&mut buf);
22808        let mut unstructured = Unstructured::new(&buf);
22809        Self::arbitrary(&mut unstructured).unwrap_or_default()
22810    }
22811}
22812impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22813    fn default() -> Self {
22814        Self::DEFAULT.clone()
22815    }
22816}
22817impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22818    type Message = MavMessage;
22819    const ID: u32 = 12901u32;
22820    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22821    const EXTRA_CRC: u8 = 254u8;
22822    const ENCODED_LEN: usize = 59usize;
22823    fn deser(
22824        _version: MavlinkVersion,
22825        __input: &[u8],
22826    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22827        let avail_len = __input.len();
22828        let mut payload_buf = [0; Self::ENCODED_LEN];
22829        let mut buf = if avail_len < Self::ENCODED_LEN {
22830            payload_buf[0..avail_len].copy_from_slice(__input);
22831            Bytes::new(&payload_buf)
22832        } else {
22833            Bytes::new(__input)
22834        };
22835        let mut __struct = Self::default();
22836        __struct.latitude = buf.get_i32_le();
22837        __struct.longitude = buf.get_i32_le();
22838        __struct.altitude_barometric = buf.get_f32_le();
22839        __struct.altitude_geodetic = buf.get_f32_le();
22840        __struct.height = buf.get_f32_le();
22841        __struct.timestamp = buf.get_f32_le();
22842        __struct.direction = buf.get_u16_le();
22843        __struct.speed_horizontal = buf.get_u16_le();
22844        __struct.speed_vertical = buf.get_i16_le();
22845        __struct.target_system = buf.get_u8();
22846        __struct.target_component = buf.get_u8();
22847        for v in &mut __struct.id_or_mac {
22848            let val = buf.get_u8();
22849            *v = val;
22850        }
22851        let tmp = buf.get_u8();
22852        __struct.status =
22853            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22854                enum_type: "MavOdidStatus",
22855                value: tmp as u32,
22856            })?;
22857        let tmp = buf.get_u8();
22858        __struct.height_reference =
22859            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22860                enum_type: "MavOdidHeightRef",
22861                value: tmp as u32,
22862            })?;
22863        let tmp = buf.get_u8();
22864        __struct.horizontal_accuracy =
22865            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22866                enum_type: "MavOdidHorAcc",
22867                value: tmp as u32,
22868            })?;
22869        let tmp = buf.get_u8();
22870        __struct.vertical_accuracy =
22871            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22872                enum_type: "MavOdidVerAcc",
22873                value: tmp as u32,
22874            })?;
22875        let tmp = buf.get_u8();
22876        __struct.barometer_accuracy =
22877            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22878                enum_type: "MavOdidVerAcc",
22879                value: tmp as u32,
22880            })?;
22881        let tmp = buf.get_u8();
22882        __struct.speed_accuracy =
22883            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22884                enum_type: "MavOdidSpeedAcc",
22885                value: tmp as u32,
22886            })?;
22887        let tmp = buf.get_u8();
22888        __struct.timestamp_accuracy =
22889            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22890                enum_type: "MavOdidTimeAcc",
22891                value: tmp as u32,
22892            })?;
22893        Ok(__struct)
22894    }
22895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22896        let mut __tmp = BytesMut::new(bytes);
22897        #[allow(clippy::absurd_extreme_comparisons)]
22898        #[allow(unused_comparisons)]
22899        if __tmp.remaining() < Self::ENCODED_LEN {
22900            panic!(
22901                "buffer is too small (need {} bytes, but got {})",
22902                Self::ENCODED_LEN,
22903                __tmp.remaining(),
22904            )
22905        }
22906        __tmp.put_i32_le(self.latitude);
22907        __tmp.put_i32_le(self.longitude);
22908        __tmp.put_f32_le(self.altitude_barometric);
22909        __tmp.put_f32_le(self.altitude_geodetic);
22910        __tmp.put_f32_le(self.height);
22911        __tmp.put_f32_le(self.timestamp);
22912        __tmp.put_u16_le(self.direction);
22913        __tmp.put_u16_le(self.speed_horizontal);
22914        __tmp.put_i16_le(self.speed_vertical);
22915        __tmp.put_u8(self.target_system);
22916        __tmp.put_u8(self.target_component);
22917        for val in &self.id_or_mac {
22918            __tmp.put_u8(*val);
22919        }
22920        __tmp.put_u8(self.status as u8);
22921        __tmp.put_u8(self.height_reference as u8);
22922        __tmp.put_u8(self.horizontal_accuracy as u8);
22923        __tmp.put_u8(self.vertical_accuracy as u8);
22924        __tmp.put_u8(self.barometer_accuracy as u8);
22925        __tmp.put_u8(self.speed_accuracy as u8);
22926        __tmp.put_u8(self.timestamp_accuracy as u8);
22927        if matches!(version, MavlinkVersion::V2) {
22928            let len = __tmp.len();
22929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22930        } else {
22931            __tmp.len()
22932        }
22933    }
22934}
22935#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22936#[doc = ""]
22937#[doc = "ID: 12915"]
22938#[derive(Debug, Clone, PartialEq)]
22939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22941#[cfg_attr(feature = "ts", derive(TS))]
22942#[cfg_attr(feature = "ts", ts(export))]
22943pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22944    #[doc = "System ID (0 for broadcast)."]
22945    pub target_system: u8,
22946    #[doc = "Component ID (0 for broadcast)."]
22947    pub target_component: u8,
22948    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22949    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22950    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22951    pub id_or_mac: [u8; 20],
22952    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22953    pub single_message_size: u8,
22954    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22955    pub msg_pack_size: u8,
22956    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22958    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22959    pub messages: [u8; 225],
22960}
22961impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22962    pub const ENCODED_LEN: usize = 249usize;
22963    pub const DEFAULT: Self = Self {
22964        target_system: 0_u8,
22965        target_component: 0_u8,
22966        id_or_mac: [0_u8; 20usize],
22967        single_message_size: 0_u8,
22968        msg_pack_size: 0_u8,
22969        messages: [0_u8; 225usize],
22970    };
22971    #[cfg(feature = "arbitrary")]
22972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22973        use arbitrary::{Arbitrary, Unstructured};
22974        let mut buf = [0u8; 1024];
22975        rng.fill_bytes(&mut buf);
22976        let mut unstructured = Unstructured::new(&buf);
22977        Self::arbitrary(&mut unstructured).unwrap_or_default()
22978    }
22979}
22980impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22981    fn default() -> Self {
22982        Self::DEFAULT.clone()
22983    }
22984}
22985impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22986    type Message = MavMessage;
22987    const ID: u32 = 12915u32;
22988    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22989    const EXTRA_CRC: u8 = 94u8;
22990    const ENCODED_LEN: usize = 249usize;
22991    fn deser(
22992        _version: MavlinkVersion,
22993        __input: &[u8],
22994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22995        let avail_len = __input.len();
22996        let mut payload_buf = [0; Self::ENCODED_LEN];
22997        let mut buf = if avail_len < Self::ENCODED_LEN {
22998            payload_buf[0..avail_len].copy_from_slice(__input);
22999            Bytes::new(&payload_buf)
23000        } else {
23001            Bytes::new(__input)
23002        };
23003        let mut __struct = Self::default();
23004        __struct.target_system = buf.get_u8();
23005        __struct.target_component = buf.get_u8();
23006        for v in &mut __struct.id_or_mac {
23007            let val = buf.get_u8();
23008            *v = val;
23009        }
23010        __struct.single_message_size = buf.get_u8();
23011        __struct.msg_pack_size = buf.get_u8();
23012        for v in &mut __struct.messages {
23013            let val = buf.get_u8();
23014            *v = val;
23015        }
23016        Ok(__struct)
23017    }
23018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23019        let mut __tmp = BytesMut::new(bytes);
23020        #[allow(clippy::absurd_extreme_comparisons)]
23021        #[allow(unused_comparisons)]
23022        if __tmp.remaining() < Self::ENCODED_LEN {
23023            panic!(
23024                "buffer is too small (need {} bytes, but got {})",
23025                Self::ENCODED_LEN,
23026                __tmp.remaining(),
23027            )
23028        }
23029        __tmp.put_u8(self.target_system);
23030        __tmp.put_u8(self.target_component);
23031        for val in &self.id_or_mac {
23032            __tmp.put_u8(*val);
23033        }
23034        __tmp.put_u8(self.single_message_size);
23035        __tmp.put_u8(self.msg_pack_size);
23036        for val in &self.messages {
23037            __tmp.put_u8(*val);
23038        }
23039        if matches!(version, MavlinkVersion::V2) {
23040            let len = __tmp.len();
23041            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23042        } else {
23043            __tmp.len()
23044        }
23045    }
23046}
23047#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23048#[doc = ""]
23049#[doc = "ID: 12905"]
23050#[derive(Debug, Clone, PartialEq)]
23051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23053#[cfg_attr(feature = "ts", derive(TS))]
23054#[cfg_attr(feature = "ts", ts(export))]
23055pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23056    #[doc = "System ID (0 for broadcast)."]
23057    pub target_system: u8,
23058    #[doc = "Component ID (0 for broadcast)."]
23059    pub target_component: u8,
23060    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23061    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23062    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23063    pub id_or_mac: [u8; 20],
23064    #[doc = "Indicates the type of the operator_id field."]
23065    pub operator_id_type: MavOdidOperatorIdType,
23066    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23067    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23068    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23069    pub operator_id: [u8; 20],
23070}
23071impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23072    pub const ENCODED_LEN: usize = 43usize;
23073    pub const DEFAULT: Self = Self {
23074        target_system: 0_u8,
23075        target_component: 0_u8,
23076        id_or_mac: [0_u8; 20usize],
23077        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23078        operator_id: [0_u8; 20usize],
23079    };
23080    #[cfg(feature = "arbitrary")]
23081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23082        use arbitrary::{Arbitrary, Unstructured};
23083        let mut buf = [0u8; 1024];
23084        rng.fill_bytes(&mut buf);
23085        let mut unstructured = Unstructured::new(&buf);
23086        Self::arbitrary(&mut unstructured).unwrap_or_default()
23087    }
23088}
23089impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23090    fn default() -> Self {
23091        Self::DEFAULT.clone()
23092    }
23093}
23094impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23095    type Message = MavMessage;
23096    const ID: u32 = 12905u32;
23097    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23098    const EXTRA_CRC: u8 = 49u8;
23099    const ENCODED_LEN: usize = 43usize;
23100    fn deser(
23101        _version: MavlinkVersion,
23102        __input: &[u8],
23103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23104        let avail_len = __input.len();
23105        let mut payload_buf = [0; Self::ENCODED_LEN];
23106        let mut buf = if avail_len < Self::ENCODED_LEN {
23107            payload_buf[0..avail_len].copy_from_slice(__input);
23108            Bytes::new(&payload_buf)
23109        } else {
23110            Bytes::new(__input)
23111        };
23112        let mut __struct = Self::default();
23113        __struct.target_system = buf.get_u8();
23114        __struct.target_component = buf.get_u8();
23115        for v in &mut __struct.id_or_mac {
23116            let val = buf.get_u8();
23117            *v = val;
23118        }
23119        let tmp = buf.get_u8();
23120        __struct.operator_id_type =
23121            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23122                enum_type: "MavOdidOperatorIdType",
23123                value: tmp as u32,
23124            })?;
23125        for v in &mut __struct.operator_id {
23126            let val = buf.get_u8();
23127            *v = val;
23128        }
23129        Ok(__struct)
23130    }
23131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23132        let mut __tmp = BytesMut::new(bytes);
23133        #[allow(clippy::absurd_extreme_comparisons)]
23134        #[allow(unused_comparisons)]
23135        if __tmp.remaining() < Self::ENCODED_LEN {
23136            panic!(
23137                "buffer is too small (need {} bytes, but got {})",
23138                Self::ENCODED_LEN,
23139                __tmp.remaining(),
23140            )
23141        }
23142        __tmp.put_u8(self.target_system);
23143        __tmp.put_u8(self.target_component);
23144        for val in &self.id_or_mac {
23145            __tmp.put_u8(*val);
23146        }
23147        __tmp.put_u8(self.operator_id_type as u8);
23148        for val in &self.operator_id {
23149            __tmp.put_u8(*val);
23150        }
23151        if matches!(version, MavlinkVersion::V2) {
23152            let len = __tmp.len();
23153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23154        } else {
23155            __tmp.len()
23156        }
23157    }
23158}
23159#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23160#[doc = ""]
23161#[doc = "ID: 12903"]
23162#[derive(Debug, Clone, PartialEq)]
23163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23165#[cfg_attr(feature = "ts", derive(TS))]
23166#[cfg_attr(feature = "ts", ts(export))]
23167pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23168    #[doc = "System ID (0 for broadcast)."]
23169    pub target_system: u8,
23170    #[doc = "Component ID (0 for broadcast)."]
23171    pub target_component: u8,
23172    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23174    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23175    pub id_or_mac: [u8; 20],
23176    #[doc = "Indicates the type of the description field."]
23177    pub description_type: MavOdidDescType,
23178    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23180    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23181    pub description: [u8; 23],
23182}
23183impl OPEN_DRONE_ID_SELF_ID_DATA {
23184    pub const ENCODED_LEN: usize = 46usize;
23185    pub const DEFAULT: Self = Self {
23186        target_system: 0_u8,
23187        target_component: 0_u8,
23188        id_or_mac: [0_u8; 20usize],
23189        description_type: MavOdidDescType::DEFAULT,
23190        description: [0_u8; 23usize],
23191    };
23192    #[cfg(feature = "arbitrary")]
23193    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23194        use arbitrary::{Arbitrary, Unstructured};
23195        let mut buf = [0u8; 1024];
23196        rng.fill_bytes(&mut buf);
23197        let mut unstructured = Unstructured::new(&buf);
23198        Self::arbitrary(&mut unstructured).unwrap_or_default()
23199    }
23200}
23201impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23202    fn default() -> Self {
23203        Self::DEFAULT.clone()
23204    }
23205}
23206impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23207    type Message = MavMessage;
23208    const ID: u32 = 12903u32;
23209    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23210    const EXTRA_CRC: u8 = 249u8;
23211    const ENCODED_LEN: usize = 46usize;
23212    fn deser(
23213        _version: MavlinkVersion,
23214        __input: &[u8],
23215    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23216        let avail_len = __input.len();
23217        let mut payload_buf = [0; Self::ENCODED_LEN];
23218        let mut buf = if avail_len < Self::ENCODED_LEN {
23219            payload_buf[0..avail_len].copy_from_slice(__input);
23220            Bytes::new(&payload_buf)
23221        } else {
23222            Bytes::new(__input)
23223        };
23224        let mut __struct = Self::default();
23225        __struct.target_system = buf.get_u8();
23226        __struct.target_component = buf.get_u8();
23227        for v in &mut __struct.id_or_mac {
23228            let val = buf.get_u8();
23229            *v = val;
23230        }
23231        let tmp = buf.get_u8();
23232        __struct.description_type =
23233            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23234                enum_type: "MavOdidDescType",
23235                value: tmp as u32,
23236            })?;
23237        for v in &mut __struct.description {
23238            let val = buf.get_u8();
23239            *v = val;
23240        }
23241        Ok(__struct)
23242    }
23243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23244        let mut __tmp = BytesMut::new(bytes);
23245        #[allow(clippy::absurd_extreme_comparisons)]
23246        #[allow(unused_comparisons)]
23247        if __tmp.remaining() < Self::ENCODED_LEN {
23248            panic!(
23249                "buffer is too small (need {} bytes, but got {})",
23250                Self::ENCODED_LEN,
23251                __tmp.remaining(),
23252            )
23253        }
23254        __tmp.put_u8(self.target_system);
23255        __tmp.put_u8(self.target_component);
23256        for val in &self.id_or_mac {
23257            __tmp.put_u8(*val);
23258        }
23259        __tmp.put_u8(self.description_type as u8);
23260        for val in &self.description {
23261            __tmp.put_u8(*val);
23262        }
23263        if matches!(version, MavlinkVersion::V2) {
23264            let len = __tmp.len();
23265            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23266        } else {
23267            __tmp.len()
23268        }
23269    }
23270}
23271#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23272#[doc = ""]
23273#[doc = "ID: 12904"]
23274#[derive(Debug, Clone, PartialEq)]
23275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23276#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23277#[cfg_attr(feature = "ts", derive(TS))]
23278#[cfg_attr(feature = "ts", ts(export))]
23279pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23280    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23281    pub operator_latitude: i32,
23282    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23283    pub operator_longitude: i32,
23284    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23285    pub area_ceiling: f32,
23286    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23287    pub area_floor: f32,
23288    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23289    pub operator_altitude_geo: f32,
23290    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23291    pub timestamp: u32,
23292    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23293    pub area_count: u16,
23294    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23295    pub area_radius: u16,
23296    #[doc = "System ID (0 for broadcast)."]
23297    pub target_system: u8,
23298    #[doc = "Component ID (0 for broadcast)."]
23299    pub target_component: u8,
23300    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23301    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23302    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23303    pub id_or_mac: [u8; 20],
23304    #[doc = "Specifies the operator location type."]
23305    pub operator_location_type: MavOdidOperatorLocationType,
23306    #[doc = "Specifies the classification type of the UA."]
23307    pub classification_type: MavOdidClassificationType,
23308    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23309    pub category_eu: MavOdidCategoryEu,
23310    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23311    pub class_eu: MavOdidClassEu,
23312}
23313impl OPEN_DRONE_ID_SYSTEM_DATA {
23314    pub const ENCODED_LEN: usize = 54usize;
23315    pub const DEFAULT: Self = Self {
23316        operator_latitude: 0_i32,
23317        operator_longitude: 0_i32,
23318        area_ceiling: 0.0_f32,
23319        area_floor: 0.0_f32,
23320        operator_altitude_geo: 0.0_f32,
23321        timestamp: 0_u32,
23322        area_count: 0_u16,
23323        area_radius: 0_u16,
23324        target_system: 0_u8,
23325        target_component: 0_u8,
23326        id_or_mac: [0_u8; 20usize],
23327        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23328        classification_type: MavOdidClassificationType::DEFAULT,
23329        category_eu: MavOdidCategoryEu::DEFAULT,
23330        class_eu: MavOdidClassEu::DEFAULT,
23331    };
23332    #[cfg(feature = "arbitrary")]
23333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23334        use arbitrary::{Arbitrary, Unstructured};
23335        let mut buf = [0u8; 1024];
23336        rng.fill_bytes(&mut buf);
23337        let mut unstructured = Unstructured::new(&buf);
23338        Self::arbitrary(&mut unstructured).unwrap_or_default()
23339    }
23340}
23341impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23342    fn default() -> Self {
23343        Self::DEFAULT.clone()
23344    }
23345}
23346impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23347    type Message = MavMessage;
23348    const ID: u32 = 12904u32;
23349    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23350    const EXTRA_CRC: u8 = 77u8;
23351    const ENCODED_LEN: usize = 54usize;
23352    fn deser(
23353        _version: MavlinkVersion,
23354        __input: &[u8],
23355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23356        let avail_len = __input.len();
23357        let mut payload_buf = [0; Self::ENCODED_LEN];
23358        let mut buf = if avail_len < Self::ENCODED_LEN {
23359            payload_buf[0..avail_len].copy_from_slice(__input);
23360            Bytes::new(&payload_buf)
23361        } else {
23362            Bytes::new(__input)
23363        };
23364        let mut __struct = Self::default();
23365        __struct.operator_latitude = buf.get_i32_le();
23366        __struct.operator_longitude = buf.get_i32_le();
23367        __struct.area_ceiling = buf.get_f32_le();
23368        __struct.area_floor = buf.get_f32_le();
23369        __struct.operator_altitude_geo = buf.get_f32_le();
23370        __struct.timestamp = buf.get_u32_le();
23371        __struct.area_count = buf.get_u16_le();
23372        __struct.area_radius = buf.get_u16_le();
23373        __struct.target_system = buf.get_u8();
23374        __struct.target_component = buf.get_u8();
23375        for v in &mut __struct.id_or_mac {
23376            let val = buf.get_u8();
23377            *v = val;
23378        }
23379        let tmp = buf.get_u8();
23380        __struct.operator_location_type =
23381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23382                enum_type: "MavOdidOperatorLocationType",
23383                value: tmp as u32,
23384            })?;
23385        let tmp = buf.get_u8();
23386        __struct.classification_type =
23387            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23388                enum_type: "MavOdidClassificationType",
23389                value: tmp as u32,
23390            })?;
23391        let tmp = buf.get_u8();
23392        __struct.category_eu =
23393            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23394                enum_type: "MavOdidCategoryEu",
23395                value: tmp as u32,
23396            })?;
23397        let tmp = buf.get_u8();
23398        __struct.class_eu =
23399            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23400                enum_type: "MavOdidClassEu",
23401                value: tmp as u32,
23402            })?;
23403        Ok(__struct)
23404    }
23405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23406        let mut __tmp = BytesMut::new(bytes);
23407        #[allow(clippy::absurd_extreme_comparisons)]
23408        #[allow(unused_comparisons)]
23409        if __tmp.remaining() < Self::ENCODED_LEN {
23410            panic!(
23411                "buffer is too small (need {} bytes, but got {})",
23412                Self::ENCODED_LEN,
23413                __tmp.remaining(),
23414            )
23415        }
23416        __tmp.put_i32_le(self.operator_latitude);
23417        __tmp.put_i32_le(self.operator_longitude);
23418        __tmp.put_f32_le(self.area_ceiling);
23419        __tmp.put_f32_le(self.area_floor);
23420        __tmp.put_f32_le(self.operator_altitude_geo);
23421        __tmp.put_u32_le(self.timestamp);
23422        __tmp.put_u16_le(self.area_count);
23423        __tmp.put_u16_le(self.area_radius);
23424        __tmp.put_u8(self.target_system);
23425        __tmp.put_u8(self.target_component);
23426        for val in &self.id_or_mac {
23427            __tmp.put_u8(*val);
23428        }
23429        __tmp.put_u8(self.operator_location_type as u8);
23430        __tmp.put_u8(self.classification_type as u8);
23431        __tmp.put_u8(self.category_eu as u8);
23432        __tmp.put_u8(self.class_eu as u8);
23433        if matches!(version, MavlinkVersion::V2) {
23434            let len = __tmp.len();
23435            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23436        } else {
23437            __tmp.len()
23438        }
23439    }
23440}
23441#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23442#[doc = ""]
23443#[doc = "ID: 12919"]
23444#[derive(Debug, Clone, PartialEq)]
23445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23447#[cfg_attr(feature = "ts", derive(TS))]
23448#[cfg_attr(feature = "ts", ts(export))]
23449pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23450    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23451    pub operator_latitude: i32,
23452    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23453    pub operator_longitude: i32,
23454    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23455    pub operator_altitude_geo: f32,
23456    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23457    pub timestamp: u32,
23458    #[doc = "System ID (0 for broadcast)."]
23459    pub target_system: u8,
23460    #[doc = "Component ID (0 for broadcast)."]
23461    pub target_component: u8,
23462}
23463impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23464    pub const ENCODED_LEN: usize = 18usize;
23465    pub const DEFAULT: Self = Self {
23466        operator_latitude: 0_i32,
23467        operator_longitude: 0_i32,
23468        operator_altitude_geo: 0.0_f32,
23469        timestamp: 0_u32,
23470        target_system: 0_u8,
23471        target_component: 0_u8,
23472    };
23473    #[cfg(feature = "arbitrary")]
23474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23475        use arbitrary::{Arbitrary, Unstructured};
23476        let mut buf = [0u8; 1024];
23477        rng.fill_bytes(&mut buf);
23478        let mut unstructured = Unstructured::new(&buf);
23479        Self::arbitrary(&mut unstructured).unwrap_or_default()
23480    }
23481}
23482impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23483    fn default() -> Self {
23484        Self::DEFAULT.clone()
23485    }
23486}
23487impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23488    type Message = MavMessage;
23489    const ID: u32 = 12919u32;
23490    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23491    const EXTRA_CRC: u8 = 7u8;
23492    const ENCODED_LEN: usize = 18usize;
23493    fn deser(
23494        _version: MavlinkVersion,
23495        __input: &[u8],
23496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23497        let avail_len = __input.len();
23498        let mut payload_buf = [0; Self::ENCODED_LEN];
23499        let mut buf = if avail_len < Self::ENCODED_LEN {
23500            payload_buf[0..avail_len].copy_from_slice(__input);
23501            Bytes::new(&payload_buf)
23502        } else {
23503            Bytes::new(__input)
23504        };
23505        let mut __struct = Self::default();
23506        __struct.operator_latitude = buf.get_i32_le();
23507        __struct.operator_longitude = buf.get_i32_le();
23508        __struct.operator_altitude_geo = buf.get_f32_le();
23509        __struct.timestamp = buf.get_u32_le();
23510        __struct.target_system = buf.get_u8();
23511        __struct.target_component = buf.get_u8();
23512        Ok(__struct)
23513    }
23514    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23515        let mut __tmp = BytesMut::new(bytes);
23516        #[allow(clippy::absurd_extreme_comparisons)]
23517        #[allow(unused_comparisons)]
23518        if __tmp.remaining() < Self::ENCODED_LEN {
23519            panic!(
23520                "buffer is too small (need {} bytes, but got {})",
23521                Self::ENCODED_LEN,
23522                __tmp.remaining(),
23523            )
23524        }
23525        __tmp.put_i32_le(self.operator_latitude);
23526        __tmp.put_i32_le(self.operator_longitude);
23527        __tmp.put_f32_le(self.operator_altitude_geo);
23528        __tmp.put_u32_le(self.timestamp);
23529        __tmp.put_u8(self.target_system);
23530        __tmp.put_u8(self.target_component);
23531        if matches!(version, MavlinkVersion::V2) {
23532            let len = __tmp.len();
23533            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23534        } else {
23535            __tmp.len()
23536        }
23537    }
23538}
23539#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23540#[doc = ""]
23541#[doc = "ID: 100"]
23542#[derive(Debug, Clone, PartialEq)]
23543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23545#[cfg_attr(feature = "ts", derive(TS))]
23546#[cfg_attr(feature = "ts", ts(export))]
23547pub struct OPTICAL_FLOW_DATA {
23548    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23549    pub time_usec: u64,
23550    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23551    pub flow_comp_m_x: f32,
23552    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23553    pub flow_comp_m_y: f32,
23554    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23555    pub ground_distance: f32,
23556    #[doc = "Flow in x-sensor direction"]
23557    pub flow_x: i16,
23558    #[doc = "Flow in y-sensor direction"]
23559    pub flow_y: i16,
23560    #[doc = "Sensor ID"]
23561    pub sensor_id: u8,
23562    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23563    pub quality: u8,
23564    #[doc = "Flow rate about X axis"]
23565    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23566    pub flow_rate_x: f32,
23567    #[doc = "Flow rate about Y axis"]
23568    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23569    pub flow_rate_y: f32,
23570}
23571impl OPTICAL_FLOW_DATA {
23572    pub const ENCODED_LEN: usize = 34usize;
23573    pub const DEFAULT: Self = Self {
23574        time_usec: 0_u64,
23575        flow_comp_m_x: 0.0_f32,
23576        flow_comp_m_y: 0.0_f32,
23577        ground_distance: 0.0_f32,
23578        flow_x: 0_i16,
23579        flow_y: 0_i16,
23580        sensor_id: 0_u8,
23581        quality: 0_u8,
23582        flow_rate_x: 0.0_f32,
23583        flow_rate_y: 0.0_f32,
23584    };
23585    #[cfg(feature = "arbitrary")]
23586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23587        use arbitrary::{Arbitrary, Unstructured};
23588        let mut buf = [0u8; 1024];
23589        rng.fill_bytes(&mut buf);
23590        let mut unstructured = Unstructured::new(&buf);
23591        Self::arbitrary(&mut unstructured).unwrap_or_default()
23592    }
23593}
23594impl Default for OPTICAL_FLOW_DATA {
23595    fn default() -> Self {
23596        Self::DEFAULT.clone()
23597    }
23598}
23599impl MessageData for OPTICAL_FLOW_DATA {
23600    type Message = MavMessage;
23601    const ID: u32 = 100u32;
23602    const NAME: &'static str = "OPTICAL_FLOW";
23603    const EXTRA_CRC: u8 = 175u8;
23604    const ENCODED_LEN: usize = 34usize;
23605    fn deser(
23606        _version: MavlinkVersion,
23607        __input: &[u8],
23608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23609        let avail_len = __input.len();
23610        let mut payload_buf = [0; Self::ENCODED_LEN];
23611        let mut buf = if avail_len < Self::ENCODED_LEN {
23612            payload_buf[0..avail_len].copy_from_slice(__input);
23613            Bytes::new(&payload_buf)
23614        } else {
23615            Bytes::new(__input)
23616        };
23617        let mut __struct = Self::default();
23618        __struct.time_usec = buf.get_u64_le();
23619        __struct.flow_comp_m_x = buf.get_f32_le();
23620        __struct.flow_comp_m_y = buf.get_f32_le();
23621        __struct.ground_distance = buf.get_f32_le();
23622        __struct.flow_x = buf.get_i16_le();
23623        __struct.flow_y = buf.get_i16_le();
23624        __struct.sensor_id = buf.get_u8();
23625        __struct.quality = buf.get_u8();
23626        __struct.flow_rate_x = buf.get_f32_le();
23627        __struct.flow_rate_y = buf.get_f32_le();
23628        Ok(__struct)
23629    }
23630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23631        let mut __tmp = BytesMut::new(bytes);
23632        #[allow(clippy::absurd_extreme_comparisons)]
23633        #[allow(unused_comparisons)]
23634        if __tmp.remaining() < Self::ENCODED_LEN {
23635            panic!(
23636                "buffer is too small (need {} bytes, but got {})",
23637                Self::ENCODED_LEN,
23638                __tmp.remaining(),
23639            )
23640        }
23641        __tmp.put_u64_le(self.time_usec);
23642        __tmp.put_f32_le(self.flow_comp_m_x);
23643        __tmp.put_f32_le(self.flow_comp_m_y);
23644        __tmp.put_f32_le(self.ground_distance);
23645        __tmp.put_i16_le(self.flow_x);
23646        __tmp.put_i16_le(self.flow_y);
23647        __tmp.put_u8(self.sensor_id);
23648        __tmp.put_u8(self.quality);
23649        if matches!(version, MavlinkVersion::V2) {
23650            __tmp.put_f32_le(self.flow_rate_x);
23651            __tmp.put_f32_le(self.flow_rate_y);
23652            let len = __tmp.len();
23653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23654        } else {
23655            __tmp.len()
23656        }
23657    }
23658}
23659#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23660#[doc = ""]
23661#[doc = "ID: 106"]
23662#[derive(Debug, Clone, PartialEq)]
23663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23665#[cfg_attr(feature = "ts", derive(TS))]
23666#[cfg_attr(feature = "ts", ts(export))]
23667pub struct OPTICAL_FLOW_RAD_DATA {
23668    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23669    pub time_usec: u64,
23670    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23671    pub integration_time_us: u32,
23672    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23673    pub integrated_x: f32,
23674    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23675    pub integrated_y: f32,
23676    #[doc = "RH rotation around X axis"]
23677    pub integrated_xgyro: f32,
23678    #[doc = "RH rotation around Y axis"]
23679    pub integrated_ygyro: f32,
23680    #[doc = "RH rotation around Z axis"]
23681    pub integrated_zgyro: f32,
23682    #[doc = "Time since the distance was sampled."]
23683    pub time_delta_distance_us: u32,
23684    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23685    pub distance: f32,
23686    #[doc = "Temperature"]
23687    pub temperature: i16,
23688    #[doc = "Sensor ID"]
23689    pub sensor_id: u8,
23690    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23691    pub quality: u8,
23692}
23693impl OPTICAL_FLOW_RAD_DATA {
23694    pub const ENCODED_LEN: usize = 44usize;
23695    pub const DEFAULT: Self = Self {
23696        time_usec: 0_u64,
23697        integration_time_us: 0_u32,
23698        integrated_x: 0.0_f32,
23699        integrated_y: 0.0_f32,
23700        integrated_xgyro: 0.0_f32,
23701        integrated_ygyro: 0.0_f32,
23702        integrated_zgyro: 0.0_f32,
23703        time_delta_distance_us: 0_u32,
23704        distance: 0.0_f32,
23705        temperature: 0_i16,
23706        sensor_id: 0_u8,
23707        quality: 0_u8,
23708    };
23709    #[cfg(feature = "arbitrary")]
23710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23711        use arbitrary::{Arbitrary, Unstructured};
23712        let mut buf = [0u8; 1024];
23713        rng.fill_bytes(&mut buf);
23714        let mut unstructured = Unstructured::new(&buf);
23715        Self::arbitrary(&mut unstructured).unwrap_or_default()
23716    }
23717}
23718impl Default for OPTICAL_FLOW_RAD_DATA {
23719    fn default() -> Self {
23720        Self::DEFAULT.clone()
23721    }
23722}
23723impl MessageData for OPTICAL_FLOW_RAD_DATA {
23724    type Message = MavMessage;
23725    const ID: u32 = 106u32;
23726    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23727    const EXTRA_CRC: u8 = 138u8;
23728    const ENCODED_LEN: usize = 44usize;
23729    fn deser(
23730        _version: MavlinkVersion,
23731        __input: &[u8],
23732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23733        let avail_len = __input.len();
23734        let mut payload_buf = [0; Self::ENCODED_LEN];
23735        let mut buf = if avail_len < Self::ENCODED_LEN {
23736            payload_buf[0..avail_len].copy_from_slice(__input);
23737            Bytes::new(&payload_buf)
23738        } else {
23739            Bytes::new(__input)
23740        };
23741        let mut __struct = Self::default();
23742        __struct.time_usec = buf.get_u64_le();
23743        __struct.integration_time_us = buf.get_u32_le();
23744        __struct.integrated_x = buf.get_f32_le();
23745        __struct.integrated_y = buf.get_f32_le();
23746        __struct.integrated_xgyro = buf.get_f32_le();
23747        __struct.integrated_ygyro = buf.get_f32_le();
23748        __struct.integrated_zgyro = buf.get_f32_le();
23749        __struct.time_delta_distance_us = buf.get_u32_le();
23750        __struct.distance = buf.get_f32_le();
23751        __struct.temperature = buf.get_i16_le();
23752        __struct.sensor_id = buf.get_u8();
23753        __struct.quality = buf.get_u8();
23754        Ok(__struct)
23755    }
23756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23757        let mut __tmp = BytesMut::new(bytes);
23758        #[allow(clippy::absurd_extreme_comparisons)]
23759        #[allow(unused_comparisons)]
23760        if __tmp.remaining() < Self::ENCODED_LEN {
23761            panic!(
23762                "buffer is too small (need {} bytes, but got {})",
23763                Self::ENCODED_LEN,
23764                __tmp.remaining(),
23765            )
23766        }
23767        __tmp.put_u64_le(self.time_usec);
23768        __tmp.put_u32_le(self.integration_time_us);
23769        __tmp.put_f32_le(self.integrated_x);
23770        __tmp.put_f32_le(self.integrated_y);
23771        __tmp.put_f32_le(self.integrated_xgyro);
23772        __tmp.put_f32_le(self.integrated_ygyro);
23773        __tmp.put_f32_le(self.integrated_zgyro);
23774        __tmp.put_u32_le(self.time_delta_distance_us);
23775        __tmp.put_f32_le(self.distance);
23776        __tmp.put_i16_le(self.temperature);
23777        __tmp.put_u8(self.sensor_id);
23778        __tmp.put_u8(self.quality);
23779        if matches!(version, MavlinkVersion::V2) {
23780            let len = __tmp.len();
23781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23782        } else {
23783            __tmp.len()
23784        }
23785    }
23786}
23787#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23788#[doc = ""]
23789#[doc = "ID: 360"]
23790#[derive(Debug, Clone, PartialEq)]
23791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23793#[cfg_attr(feature = "ts", derive(TS))]
23794#[cfg_attr(feature = "ts", ts(export))]
23795pub struct ORBIT_EXECUTION_STATUS_DATA {
23796    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23797    pub time_usec: u64,
23798    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23799    pub radius: f32,
23800    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23801    pub x: i32,
23802    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23803    pub y: i32,
23804    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23805    pub z: f32,
23806    #[doc = "The coordinate system of the fields: x, y, z."]
23807    pub frame: MavFrame,
23808}
23809impl ORBIT_EXECUTION_STATUS_DATA {
23810    pub const ENCODED_LEN: usize = 25usize;
23811    pub const DEFAULT: Self = Self {
23812        time_usec: 0_u64,
23813        radius: 0.0_f32,
23814        x: 0_i32,
23815        y: 0_i32,
23816        z: 0.0_f32,
23817        frame: MavFrame::DEFAULT,
23818    };
23819    #[cfg(feature = "arbitrary")]
23820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23821        use arbitrary::{Arbitrary, Unstructured};
23822        let mut buf = [0u8; 1024];
23823        rng.fill_bytes(&mut buf);
23824        let mut unstructured = Unstructured::new(&buf);
23825        Self::arbitrary(&mut unstructured).unwrap_or_default()
23826    }
23827}
23828impl Default for ORBIT_EXECUTION_STATUS_DATA {
23829    fn default() -> Self {
23830        Self::DEFAULT.clone()
23831    }
23832}
23833impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23834    type Message = MavMessage;
23835    const ID: u32 = 360u32;
23836    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23837    const EXTRA_CRC: u8 = 11u8;
23838    const ENCODED_LEN: usize = 25usize;
23839    fn deser(
23840        _version: MavlinkVersion,
23841        __input: &[u8],
23842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23843        let avail_len = __input.len();
23844        let mut payload_buf = [0; Self::ENCODED_LEN];
23845        let mut buf = if avail_len < Self::ENCODED_LEN {
23846            payload_buf[0..avail_len].copy_from_slice(__input);
23847            Bytes::new(&payload_buf)
23848        } else {
23849            Bytes::new(__input)
23850        };
23851        let mut __struct = Self::default();
23852        __struct.time_usec = buf.get_u64_le();
23853        __struct.radius = buf.get_f32_le();
23854        __struct.x = buf.get_i32_le();
23855        __struct.y = buf.get_i32_le();
23856        __struct.z = buf.get_f32_le();
23857        let tmp = buf.get_u8();
23858        __struct.frame =
23859            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23860                enum_type: "MavFrame",
23861                value: tmp as u32,
23862            })?;
23863        Ok(__struct)
23864    }
23865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23866        let mut __tmp = BytesMut::new(bytes);
23867        #[allow(clippy::absurd_extreme_comparisons)]
23868        #[allow(unused_comparisons)]
23869        if __tmp.remaining() < Self::ENCODED_LEN {
23870            panic!(
23871                "buffer is too small (need {} bytes, but got {})",
23872                Self::ENCODED_LEN,
23873                __tmp.remaining(),
23874            )
23875        }
23876        __tmp.put_u64_le(self.time_usec);
23877        __tmp.put_f32_le(self.radius);
23878        __tmp.put_i32_le(self.x);
23879        __tmp.put_i32_le(self.y);
23880        __tmp.put_f32_le(self.z);
23881        __tmp.put_u8(self.frame as u8);
23882        if matches!(version, MavlinkVersion::V2) {
23883            let len = __tmp.len();
23884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23885        } else {
23886            __tmp.len()
23887        }
23888    }
23889}
23890#[doc = "Response from a PARAM_EXT_SET message."]
23891#[doc = ""]
23892#[doc = "ID: 324"]
23893#[derive(Debug, Clone, PartialEq)]
23894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23896#[cfg_attr(feature = "ts", derive(TS))]
23897#[cfg_attr(feature = "ts", ts(export))]
23898pub struct PARAM_EXT_ACK_DATA {
23899    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23900    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23901    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23902    pub param_id: [u8; 16],
23903    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23904    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23905    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23906    pub param_value: [u8; 128],
23907    #[doc = "Parameter type."]
23908    pub param_type: MavParamExtType,
23909    #[doc = "Result code."]
23910    pub param_result: ParamAck,
23911}
23912impl PARAM_EXT_ACK_DATA {
23913    pub const ENCODED_LEN: usize = 146usize;
23914    pub const DEFAULT: Self = Self {
23915        param_id: [0_u8; 16usize],
23916        param_value: [0_u8; 128usize],
23917        param_type: MavParamExtType::DEFAULT,
23918        param_result: ParamAck::DEFAULT,
23919    };
23920    #[cfg(feature = "arbitrary")]
23921    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23922        use arbitrary::{Arbitrary, Unstructured};
23923        let mut buf = [0u8; 1024];
23924        rng.fill_bytes(&mut buf);
23925        let mut unstructured = Unstructured::new(&buf);
23926        Self::arbitrary(&mut unstructured).unwrap_or_default()
23927    }
23928}
23929impl Default for PARAM_EXT_ACK_DATA {
23930    fn default() -> Self {
23931        Self::DEFAULT.clone()
23932    }
23933}
23934impl MessageData for PARAM_EXT_ACK_DATA {
23935    type Message = MavMessage;
23936    const ID: u32 = 324u32;
23937    const NAME: &'static str = "PARAM_EXT_ACK";
23938    const EXTRA_CRC: u8 = 132u8;
23939    const ENCODED_LEN: usize = 146usize;
23940    fn deser(
23941        _version: MavlinkVersion,
23942        __input: &[u8],
23943    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23944        let avail_len = __input.len();
23945        let mut payload_buf = [0; Self::ENCODED_LEN];
23946        let mut buf = if avail_len < Self::ENCODED_LEN {
23947            payload_buf[0..avail_len].copy_from_slice(__input);
23948            Bytes::new(&payload_buf)
23949        } else {
23950            Bytes::new(__input)
23951        };
23952        let mut __struct = Self::default();
23953        for v in &mut __struct.param_id {
23954            let val = buf.get_u8();
23955            *v = val;
23956        }
23957        for v in &mut __struct.param_value {
23958            let val = buf.get_u8();
23959            *v = val;
23960        }
23961        let tmp = buf.get_u8();
23962        __struct.param_type =
23963            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23964                enum_type: "MavParamExtType",
23965                value: tmp as u32,
23966            })?;
23967        let tmp = buf.get_u8();
23968        __struct.param_result =
23969            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23970                enum_type: "ParamAck",
23971                value: tmp as u32,
23972            })?;
23973        Ok(__struct)
23974    }
23975    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23976        let mut __tmp = BytesMut::new(bytes);
23977        #[allow(clippy::absurd_extreme_comparisons)]
23978        #[allow(unused_comparisons)]
23979        if __tmp.remaining() < Self::ENCODED_LEN {
23980            panic!(
23981                "buffer is too small (need {} bytes, but got {})",
23982                Self::ENCODED_LEN,
23983                __tmp.remaining(),
23984            )
23985        }
23986        for val in &self.param_id {
23987            __tmp.put_u8(*val);
23988        }
23989        for val in &self.param_value {
23990            __tmp.put_u8(*val);
23991        }
23992        __tmp.put_u8(self.param_type as u8);
23993        __tmp.put_u8(self.param_result as u8);
23994        if matches!(version, MavlinkVersion::V2) {
23995            let len = __tmp.len();
23996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23997        } else {
23998            __tmp.len()
23999        }
24000    }
24001}
24002#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
24003#[doc = ""]
24004#[doc = "ID: 321"]
24005#[derive(Debug, Clone, PartialEq)]
24006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24008#[cfg_attr(feature = "ts", derive(TS))]
24009#[cfg_attr(feature = "ts", ts(export))]
24010pub struct PARAM_EXT_REQUEST_LIST_DATA {
24011    #[doc = "System ID"]
24012    pub target_system: u8,
24013    #[doc = "Component ID"]
24014    pub target_component: u8,
24015}
24016impl PARAM_EXT_REQUEST_LIST_DATA {
24017    pub const ENCODED_LEN: usize = 2usize;
24018    pub const DEFAULT: Self = Self {
24019        target_system: 0_u8,
24020        target_component: 0_u8,
24021    };
24022    #[cfg(feature = "arbitrary")]
24023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24024        use arbitrary::{Arbitrary, Unstructured};
24025        let mut buf = [0u8; 1024];
24026        rng.fill_bytes(&mut buf);
24027        let mut unstructured = Unstructured::new(&buf);
24028        Self::arbitrary(&mut unstructured).unwrap_or_default()
24029    }
24030}
24031impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24032    fn default() -> Self {
24033        Self::DEFAULT.clone()
24034    }
24035}
24036impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24037    type Message = MavMessage;
24038    const ID: u32 = 321u32;
24039    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24040    const EXTRA_CRC: u8 = 88u8;
24041    const ENCODED_LEN: usize = 2usize;
24042    fn deser(
24043        _version: MavlinkVersion,
24044        __input: &[u8],
24045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24046        let avail_len = __input.len();
24047        let mut payload_buf = [0; Self::ENCODED_LEN];
24048        let mut buf = if avail_len < Self::ENCODED_LEN {
24049            payload_buf[0..avail_len].copy_from_slice(__input);
24050            Bytes::new(&payload_buf)
24051        } else {
24052            Bytes::new(__input)
24053        };
24054        let mut __struct = Self::default();
24055        __struct.target_system = buf.get_u8();
24056        __struct.target_component = buf.get_u8();
24057        Ok(__struct)
24058    }
24059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24060        let mut __tmp = BytesMut::new(bytes);
24061        #[allow(clippy::absurd_extreme_comparisons)]
24062        #[allow(unused_comparisons)]
24063        if __tmp.remaining() < Self::ENCODED_LEN {
24064            panic!(
24065                "buffer is too small (need {} bytes, but got {})",
24066                Self::ENCODED_LEN,
24067                __tmp.remaining(),
24068            )
24069        }
24070        __tmp.put_u8(self.target_system);
24071        __tmp.put_u8(self.target_component);
24072        if matches!(version, MavlinkVersion::V2) {
24073            let len = __tmp.len();
24074            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24075        } else {
24076            __tmp.len()
24077        }
24078    }
24079}
24080#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24081#[doc = ""]
24082#[doc = "ID: 320"]
24083#[derive(Debug, Clone, PartialEq)]
24084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24086#[cfg_attr(feature = "ts", derive(TS))]
24087#[cfg_attr(feature = "ts", ts(export))]
24088pub struct PARAM_EXT_REQUEST_READ_DATA {
24089    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24090    pub param_index: i16,
24091    #[doc = "System ID"]
24092    pub target_system: u8,
24093    #[doc = "Component ID"]
24094    pub target_component: u8,
24095    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24096    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24097    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24098    pub param_id: [u8; 16],
24099}
24100impl PARAM_EXT_REQUEST_READ_DATA {
24101    pub const ENCODED_LEN: usize = 20usize;
24102    pub const DEFAULT: Self = Self {
24103        param_index: 0_i16,
24104        target_system: 0_u8,
24105        target_component: 0_u8,
24106        param_id: [0_u8; 16usize],
24107    };
24108    #[cfg(feature = "arbitrary")]
24109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24110        use arbitrary::{Arbitrary, Unstructured};
24111        let mut buf = [0u8; 1024];
24112        rng.fill_bytes(&mut buf);
24113        let mut unstructured = Unstructured::new(&buf);
24114        Self::arbitrary(&mut unstructured).unwrap_or_default()
24115    }
24116}
24117impl Default for PARAM_EXT_REQUEST_READ_DATA {
24118    fn default() -> Self {
24119        Self::DEFAULT.clone()
24120    }
24121}
24122impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24123    type Message = MavMessage;
24124    const ID: u32 = 320u32;
24125    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24126    const EXTRA_CRC: u8 = 243u8;
24127    const ENCODED_LEN: usize = 20usize;
24128    fn deser(
24129        _version: MavlinkVersion,
24130        __input: &[u8],
24131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24132        let avail_len = __input.len();
24133        let mut payload_buf = [0; Self::ENCODED_LEN];
24134        let mut buf = if avail_len < Self::ENCODED_LEN {
24135            payload_buf[0..avail_len].copy_from_slice(__input);
24136            Bytes::new(&payload_buf)
24137        } else {
24138            Bytes::new(__input)
24139        };
24140        let mut __struct = Self::default();
24141        __struct.param_index = buf.get_i16_le();
24142        __struct.target_system = buf.get_u8();
24143        __struct.target_component = buf.get_u8();
24144        for v in &mut __struct.param_id {
24145            let val = buf.get_u8();
24146            *v = val;
24147        }
24148        Ok(__struct)
24149    }
24150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24151        let mut __tmp = BytesMut::new(bytes);
24152        #[allow(clippy::absurd_extreme_comparisons)]
24153        #[allow(unused_comparisons)]
24154        if __tmp.remaining() < Self::ENCODED_LEN {
24155            panic!(
24156                "buffer is too small (need {} bytes, but got {})",
24157                Self::ENCODED_LEN,
24158                __tmp.remaining(),
24159            )
24160        }
24161        __tmp.put_i16_le(self.param_index);
24162        __tmp.put_u8(self.target_system);
24163        __tmp.put_u8(self.target_component);
24164        for val in &self.param_id {
24165            __tmp.put_u8(*val);
24166        }
24167        if matches!(version, MavlinkVersion::V2) {
24168            let len = __tmp.len();
24169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24170        } else {
24171            __tmp.len()
24172        }
24173    }
24174}
24175#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24176#[doc = ""]
24177#[doc = "ID: 323"]
24178#[derive(Debug, Clone, PartialEq)]
24179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24181#[cfg_attr(feature = "ts", derive(TS))]
24182#[cfg_attr(feature = "ts", ts(export))]
24183pub struct PARAM_EXT_SET_DATA {
24184    #[doc = "System ID"]
24185    pub target_system: u8,
24186    #[doc = "Component ID"]
24187    pub target_component: u8,
24188    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24189    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24190    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24191    pub param_id: [u8; 16],
24192    #[doc = "Parameter value"]
24193    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24194    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24195    pub param_value: [u8; 128],
24196    #[doc = "Parameter type."]
24197    pub param_type: MavParamExtType,
24198}
24199impl PARAM_EXT_SET_DATA {
24200    pub const ENCODED_LEN: usize = 147usize;
24201    pub const DEFAULT: Self = Self {
24202        target_system: 0_u8,
24203        target_component: 0_u8,
24204        param_id: [0_u8; 16usize],
24205        param_value: [0_u8; 128usize],
24206        param_type: MavParamExtType::DEFAULT,
24207    };
24208    #[cfg(feature = "arbitrary")]
24209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24210        use arbitrary::{Arbitrary, Unstructured};
24211        let mut buf = [0u8; 1024];
24212        rng.fill_bytes(&mut buf);
24213        let mut unstructured = Unstructured::new(&buf);
24214        Self::arbitrary(&mut unstructured).unwrap_or_default()
24215    }
24216}
24217impl Default for PARAM_EXT_SET_DATA {
24218    fn default() -> Self {
24219        Self::DEFAULT.clone()
24220    }
24221}
24222impl MessageData for PARAM_EXT_SET_DATA {
24223    type Message = MavMessage;
24224    const ID: u32 = 323u32;
24225    const NAME: &'static str = "PARAM_EXT_SET";
24226    const EXTRA_CRC: u8 = 78u8;
24227    const ENCODED_LEN: usize = 147usize;
24228    fn deser(
24229        _version: MavlinkVersion,
24230        __input: &[u8],
24231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24232        let avail_len = __input.len();
24233        let mut payload_buf = [0; Self::ENCODED_LEN];
24234        let mut buf = if avail_len < Self::ENCODED_LEN {
24235            payload_buf[0..avail_len].copy_from_slice(__input);
24236            Bytes::new(&payload_buf)
24237        } else {
24238            Bytes::new(__input)
24239        };
24240        let mut __struct = Self::default();
24241        __struct.target_system = buf.get_u8();
24242        __struct.target_component = buf.get_u8();
24243        for v in &mut __struct.param_id {
24244            let val = buf.get_u8();
24245            *v = val;
24246        }
24247        for v in &mut __struct.param_value {
24248            let val = buf.get_u8();
24249            *v = val;
24250        }
24251        let tmp = buf.get_u8();
24252        __struct.param_type =
24253            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24254                enum_type: "MavParamExtType",
24255                value: tmp as u32,
24256            })?;
24257        Ok(__struct)
24258    }
24259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24260        let mut __tmp = BytesMut::new(bytes);
24261        #[allow(clippy::absurd_extreme_comparisons)]
24262        #[allow(unused_comparisons)]
24263        if __tmp.remaining() < Self::ENCODED_LEN {
24264            panic!(
24265                "buffer is too small (need {} bytes, but got {})",
24266                Self::ENCODED_LEN,
24267                __tmp.remaining(),
24268            )
24269        }
24270        __tmp.put_u8(self.target_system);
24271        __tmp.put_u8(self.target_component);
24272        for val in &self.param_id {
24273            __tmp.put_u8(*val);
24274        }
24275        for val in &self.param_value {
24276            __tmp.put_u8(*val);
24277        }
24278        __tmp.put_u8(self.param_type as u8);
24279        if matches!(version, MavlinkVersion::V2) {
24280            let len = __tmp.len();
24281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24282        } else {
24283            __tmp.len()
24284        }
24285    }
24286}
24287#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24288#[doc = ""]
24289#[doc = "ID: 322"]
24290#[derive(Debug, Clone, PartialEq)]
24291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24293#[cfg_attr(feature = "ts", derive(TS))]
24294#[cfg_attr(feature = "ts", ts(export))]
24295pub struct PARAM_EXT_VALUE_DATA {
24296    #[doc = "Total number of parameters"]
24297    pub param_count: u16,
24298    #[doc = "Index of this parameter"]
24299    pub param_index: u16,
24300    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24301    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24302    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24303    pub param_id: [u8; 16],
24304    #[doc = "Parameter value"]
24305    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24306    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24307    pub param_value: [u8; 128],
24308    #[doc = "Parameter type."]
24309    pub param_type: MavParamExtType,
24310}
24311impl PARAM_EXT_VALUE_DATA {
24312    pub const ENCODED_LEN: usize = 149usize;
24313    pub const DEFAULT: Self = Self {
24314        param_count: 0_u16,
24315        param_index: 0_u16,
24316        param_id: [0_u8; 16usize],
24317        param_value: [0_u8; 128usize],
24318        param_type: MavParamExtType::DEFAULT,
24319    };
24320    #[cfg(feature = "arbitrary")]
24321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24322        use arbitrary::{Arbitrary, Unstructured};
24323        let mut buf = [0u8; 1024];
24324        rng.fill_bytes(&mut buf);
24325        let mut unstructured = Unstructured::new(&buf);
24326        Self::arbitrary(&mut unstructured).unwrap_or_default()
24327    }
24328}
24329impl Default for PARAM_EXT_VALUE_DATA {
24330    fn default() -> Self {
24331        Self::DEFAULT.clone()
24332    }
24333}
24334impl MessageData for PARAM_EXT_VALUE_DATA {
24335    type Message = MavMessage;
24336    const ID: u32 = 322u32;
24337    const NAME: &'static str = "PARAM_EXT_VALUE";
24338    const EXTRA_CRC: u8 = 243u8;
24339    const ENCODED_LEN: usize = 149usize;
24340    fn deser(
24341        _version: MavlinkVersion,
24342        __input: &[u8],
24343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24344        let avail_len = __input.len();
24345        let mut payload_buf = [0; Self::ENCODED_LEN];
24346        let mut buf = if avail_len < Self::ENCODED_LEN {
24347            payload_buf[0..avail_len].copy_from_slice(__input);
24348            Bytes::new(&payload_buf)
24349        } else {
24350            Bytes::new(__input)
24351        };
24352        let mut __struct = Self::default();
24353        __struct.param_count = buf.get_u16_le();
24354        __struct.param_index = buf.get_u16_le();
24355        for v in &mut __struct.param_id {
24356            let val = buf.get_u8();
24357            *v = val;
24358        }
24359        for v in &mut __struct.param_value {
24360            let val = buf.get_u8();
24361            *v = val;
24362        }
24363        let tmp = buf.get_u8();
24364        __struct.param_type =
24365            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24366                enum_type: "MavParamExtType",
24367                value: tmp as u32,
24368            })?;
24369        Ok(__struct)
24370    }
24371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24372        let mut __tmp = BytesMut::new(bytes);
24373        #[allow(clippy::absurd_extreme_comparisons)]
24374        #[allow(unused_comparisons)]
24375        if __tmp.remaining() < Self::ENCODED_LEN {
24376            panic!(
24377                "buffer is too small (need {} bytes, but got {})",
24378                Self::ENCODED_LEN,
24379                __tmp.remaining(),
24380            )
24381        }
24382        __tmp.put_u16_le(self.param_count);
24383        __tmp.put_u16_le(self.param_index);
24384        for val in &self.param_id {
24385            __tmp.put_u8(*val);
24386        }
24387        for val in &self.param_value {
24388            __tmp.put_u8(*val);
24389        }
24390        __tmp.put_u8(self.param_type as u8);
24391        if matches!(version, MavlinkVersion::V2) {
24392            let len = __tmp.len();
24393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24394        } else {
24395            __tmp.len()
24396        }
24397    }
24398}
24399#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24400#[doc = ""]
24401#[doc = "ID: 50"]
24402#[derive(Debug, Clone, PartialEq)]
24403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24405#[cfg_attr(feature = "ts", derive(TS))]
24406#[cfg_attr(feature = "ts", ts(export))]
24407pub struct PARAM_MAP_RC_DATA {
24408    #[doc = "Initial parameter value"]
24409    pub param_value0: f32,
24410    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24411    pub scale: f32,
24412    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24413    pub param_value_min: f32,
24414    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24415    pub param_value_max: f32,
24416    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24417    pub param_index: i16,
24418    #[doc = "System ID"]
24419    pub target_system: u8,
24420    #[doc = "Component ID"]
24421    pub target_component: u8,
24422    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24423    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24424    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24425    pub param_id: [u8; 16],
24426    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24427    pub parameter_rc_channel_index: u8,
24428}
24429impl PARAM_MAP_RC_DATA {
24430    pub const ENCODED_LEN: usize = 37usize;
24431    pub const DEFAULT: Self = Self {
24432        param_value0: 0.0_f32,
24433        scale: 0.0_f32,
24434        param_value_min: 0.0_f32,
24435        param_value_max: 0.0_f32,
24436        param_index: 0_i16,
24437        target_system: 0_u8,
24438        target_component: 0_u8,
24439        param_id: [0_u8; 16usize],
24440        parameter_rc_channel_index: 0_u8,
24441    };
24442    #[cfg(feature = "arbitrary")]
24443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24444        use arbitrary::{Arbitrary, Unstructured};
24445        let mut buf = [0u8; 1024];
24446        rng.fill_bytes(&mut buf);
24447        let mut unstructured = Unstructured::new(&buf);
24448        Self::arbitrary(&mut unstructured).unwrap_or_default()
24449    }
24450}
24451impl Default for PARAM_MAP_RC_DATA {
24452    fn default() -> Self {
24453        Self::DEFAULT.clone()
24454    }
24455}
24456impl MessageData for PARAM_MAP_RC_DATA {
24457    type Message = MavMessage;
24458    const ID: u32 = 50u32;
24459    const NAME: &'static str = "PARAM_MAP_RC";
24460    const EXTRA_CRC: u8 = 78u8;
24461    const ENCODED_LEN: usize = 37usize;
24462    fn deser(
24463        _version: MavlinkVersion,
24464        __input: &[u8],
24465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24466        let avail_len = __input.len();
24467        let mut payload_buf = [0; Self::ENCODED_LEN];
24468        let mut buf = if avail_len < Self::ENCODED_LEN {
24469            payload_buf[0..avail_len].copy_from_slice(__input);
24470            Bytes::new(&payload_buf)
24471        } else {
24472            Bytes::new(__input)
24473        };
24474        let mut __struct = Self::default();
24475        __struct.param_value0 = buf.get_f32_le();
24476        __struct.scale = buf.get_f32_le();
24477        __struct.param_value_min = buf.get_f32_le();
24478        __struct.param_value_max = buf.get_f32_le();
24479        __struct.param_index = buf.get_i16_le();
24480        __struct.target_system = buf.get_u8();
24481        __struct.target_component = buf.get_u8();
24482        for v in &mut __struct.param_id {
24483            let val = buf.get_u8();
24484            *v = val;
24485        }
24486        __struct.parameter_rc_channel_index = buf.get_u8();
24487        Ok(__struct)
24488    }
24489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24490        let mut __tmp = BytesMut::new(bytes);
24491        #[allow(clippy::absurd_extreme_comparisons)]
24492        #[allow(unused_comparisons)]
24493        if __tmp.remaining() < Self::ENCODED_LEN {
24494            panic!(
24495                "buffer is too small (need {} bytes, but got {})",
24496                Self::ENCODED_LEN,
24497                __tmp.remaining(),
24498            )
24499        }
24500        __tmp.put_f32_le(self.param_value0);
24501        __tmp.put_f32_le(self.scale);
24502        __tmp.put_f32_le(self.param_value_min);
24503        __tmp.put_f32_le(self.param_value_max);
24504        __tmp.put_i16_le(self.param_index);
24505        __tmp.put_u8(self.target_system);
24506        __tmp.put_u8(self.target_component);
24507        for val in &self.param_id {
24508            __tmp.put_u8(*val);
24509        }
24510        __tmp.put_u8(self.parameter_rc_channel_index);
24511        if matches!(version, MavlinkVersion::V2) {
24512            let len = __tmp.len();
24513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24514        } else {
24515            __tmp.len()
24516        }
24517    }
24518}
24519#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24520#[doc = ""]
24521#[doc = "ID: 21"]
24522#[derive(Debug, Clone, PartialEq)]
24523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24525#[cfg_attr(feature = "ts", derive(TS))]
24526#[cfg_attr(feature = "ts", ts(export))]
24527pub struct PARAM_REQUEST_LIST_DATA {
24528    #[doc = "System ID"]
24529    pub target_system: u8,
24530    #[doc = "Component ID"]
24531    pub target_component: u8,
24532}
24533impl PARAM_REQUEST_LIST_DATA {
24534    pub const ENCODED_LEN: usize = 2usize;
24535    pub const DEFAULT: Self = Self {
24536        target_system: 0_u8,
24537        target_component: 0_u8,
24538    };
24539    #[cfg(feature = "arbitrary")]
24540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24541        use arbitrary::{Arbitrary, Unstructured};
24542        let mut buf = [0u8; 1024];
24543        rng.fill_bytes(&mut buf);
24544        let mut unstructured = Unstructured::new(&buf);
24545        Self::arbitrary(&mut unstructured).unwrap_or_default()
24546    }
24547}
24548impl Default for PARAM_REQUEST_LIST_DATA {
24549    fn default() -> Self {
24550        Self::DEFAULT.clone()
24551    }
24552}
24553impl MessageData for PARAM_REQUEST_LIST_DATA {
24554    type Message = MavMessage;
24555    const ID: u32 = 21u32;
24556    const NAME: &'static str = "PARAM_REQUEST_LIST";
24557    const EXTRA_CRC: u8 = 159u8;
24558    const ENCODED_LEN: usize = 2usize;
24559    fn deser(
24560        _version: MavlinkVersion,
24561        __input: &[u8],
24562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24563        let avail_len = __input.len();
24564        let mut payload_buf = [0; Self::ENCODED_LEN];
24565        let mut buf = if avail_len < Self::ENCODED_LEN {
24566            payload_buf[0..avail_len].copy_from_slice(__input);
24567            Bytes::new(&payload_buf)
24568        } else {
24569            Bytes::new(__input)
24570        };
24571        let mut __struct = Self::default();
24572        __struct.target_system = buf.get_u8();
24573        __struct.target_component = buf.get_u8();
24574        Ok(__struct)
24575    }
24576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24577        let mut __tmp = BytesMut::new(bytes);
24578        #[allow(clippy::absurd_extreme_comparisons)]
24579        #[allow(unused_comparisons)]
24580        if __tmp.remaining() < Self::ENCODED_LEN {
24581            panic!(
24582                "buffer is too small (need {} bytes, but got {})",
24583                Self::ENCODED_LEN,
24584                __tmp.remaining(),
24585            )
24586        }
24587        __tmp.put_u8(self.target_system);
24588        __tmp.put_u8(self.target_component);
24589        if matches!(version, MavlinkVersion::V2) {
24590            let len = __tmp.len();
24591            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24592        } else {
24593            __tmp.len()
24594        }
24595    }
24596}
24597#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24598#[doc = ""]
24599#[doc = "ID: 20"]
24600#[derive(Debug, Clone, PartialEq)]
24601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24603#[cfg_attr(feature = "ts", derive(TS))]
24604#[cfg_attr(feature = "ts", ts(export))]
24605pub struct PARAM_REQUEST_READ_DATA {
24606    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24607    pub param_index: i16,
24608    #[doc = "System ID"]
24609    pub target_system: u8,
24610    #[doc = "Component ID"]
24611    pub target_component: u8,
24612    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24615    pub param_id: [u8; 16],
24616}
24617impl PARAM_REQUEST_READ_DATA {
24618    pub const ENCODED_LEN: usize = 20usize;
24619    pub const DEFAULT: Self = Self {
24620        param_index: 0_i16,
24621        target_system: 0_u8,
24622        target_component: 0_u8,
24623        param_id: [0_u8; 16usize],
24624    };
24625    #[cfg(feature = "arbitrary")]
24626    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24627        use arbitrary::{Arbitrary, Unstructured};
24628        let mut buf = [0u8; 1024];
24629        rng.fill_bytes(&mut buf);
24630        let mut unstructured = Unstructured::new(&buf);
24631        Self::arbitrary(&mut unstructured).unwrap_or_default()
24632    }
24633}
24634impl Default for PARAM_REQUEST_READ_DATA {
24635    fn default() -> Self {
24636        Self::DEFAULT.clone()
24637    }
24638}
24639impl MessageData for PARAM_REQUEST_READ_DATA {
24640    type Message = MavMessage;
24641    const ID: u32 = 20u32;
24642    const NAME: &'static str = "PARAM_REQUEST_READ";
24643    const EXTRA_CRC: u8 = 214u8;
24644    const ENCODED_LEN: usize = 20usize;
24645    fn deser(
24646        _version: MavlinkVersion,
24647        __input: &[u8],
24648    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24649        let avail_len = __input.len();
24650        let mut payload_buf = [0; Self::ENCODED_LEN];
24651        let mut buf = if avail_len < Self::ENCODED_LEN {
24652            payload_buf[0..avail_len].copy_from_slice(__input);
24653            Bytes::new(&payload_buf)
24654        } else {
24655            Bytes::new(__input)
24656        };
24657        let mut __struct = Self::default();
24658        __struct.param_index = buf.get_i16_le();
24659        __struct.target_system = buf.get_u8();
24660        __struct.target_component = buf.get_u8();
24661        for v in &mut __struct.param_id {
24662            let val = buf.get_u8();
24663            *v = val;
24664        }
24665        Ok(__struct)
24666    }
24667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24668        let mut __tmp = BytesMut::new(bytes);
24669        #[allow(clippy::absurd_extreme_comparisons)]
24670        #[allow(unused_comparisons)]
24671        if __tmp.remaining() < Self::ENCODED_LEN {
24672            panic!(
24673                "buffer is too small (need {} bytes, but got {})",
24674                Self::ENCODED_LEN,
24675                __tmp.remaining(),
24676            )
24677        }
24678        __tmp.put_i16_le(self.param_index);
24679        __tmp.put_u8(self.target_system);
24680        __tmp.put_u8(self.target_component);
24681        for val in &self.param_id {
24682            __tmp.put_u8(*val);
24683        }
24684        if matches!(version, MavlinkVersion::V2) {
24685            let len = __tmp.len();
24686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24687        } else {
24688            __tmp.len()
24689        }
24690    }
24691}
24692#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24693#[doc = ""]
24694#[doc = "ID: 23"]
24695#[derive(Debug, Clone, PartialEq)]
24696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24698#[cfg_attr(feature = "ts", derive(TS))]
24699#[cfg_attr(feature = "ts", ts(export))]
24700pub struct PARAM_SET_DATA {
24701    #[doc = "Onboard parameter value"]
24702    pub param_value: f32,
24703    #[doc = "System ID"]
24704    pub target_system: u8,
24705    #[doc = "Component ID"]
24706    pub target_component: u8,
24707    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24710    pub param_id: [u8; 16],
24711    #[doc = "Onboard parameter type."]
24712    pub param_type: MavParamType,
24713}
24714impl PARAM_SET_DATA {
24715    pub const ENCODED_LEN: usize = 23usize;
24716    pub const DEFAULT: Self = Self {
24717        param_value: 0.0_f32,
24718        target_system: 0_u8,
24719        target_component: 0_u8,
24720        param_id: [0_u8; 16usize],
24721        param_type: MavParamType::DEFAULT,
24722    };
24723    #[cfg(feature = "arbitrary")]
24724    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24725        use arbitrary::{Arbitrary, Unstructured};
24726        let mut buf = [0u8; 1024];
24727        rng.fill_bytes(&mut buf);
24728        let mut unstructured = Unstructured::new(&buf);
24729        Self::arbitrary(&mut unstructured).unwrap_or_default()
24730    }
24731}
24732impl Default for PARAM_SET_DATA {
24733    fn default() -> Self {
24734        Self::DEFAULT.clone()
24735    }
24736}
24737impl MessageData for PARAM_SET_DATA {
24738    type Message = MavMessage;
24739    const ID: u32 = 23u32;
24740    const NAME: &'static str = "PARAM_SET";
24741    const EXTRA_CRC: u8 = 168u8;
24742    const ENCODED_LEN: usize = 23usize;
24743    fn deser(
24744        _version: MavlinkVersion,
24745        __input: &[u8],
24746    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24747        let avail_len = __input.len();
24748        let mut payload_buf = [0; Self::ENCODED_LEN];
24749        let mut buf = if avail_len < Self::ENCODED_LEN {
24750            payload_buf[0..avail_len].copy_from_slice(__input);
24751            Bytes::new(&payload_buf)
24752        } else {
24753            Bytes::new(__input)
24754        };
24755        let mut __struct = Self::default();
24756        __struct.param_value = buf.get_f32_le();
24757        __struct.target_system = buf.get_u8();
24758        __struct.target_component = buf.get_u8();
24759        for v in &mut __struct.param_id {
24760            let val = buf.get_u8();
24761            *v = val;
24762        }
24763        let tmp = buf.get_u8();
24764        __struct.param_type =
24765            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24766                enum_type: "MavParamType",
24767                value: tmp as u32,
24768            })?;
24769        Ok(__struct)
24770    }
24771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24772        let mut __tmp = BytesMut::new(bytes);
24773        #[allow(clippy::absurd_extreme_comparisons)]
24774        #[allow(unused_comparisons)]
24775        if __tmp.remaining() < Self::ENCODED_LEN {
24776            panic!(
24777                "buffer is too small (need {} bytes, but got {})",
24778                Self::ENCODED_LEN,
24779                __tmp.remaining(),
24780            )
24781        }
24782        __tmp.put_f32_le(self.param_value);
24783        __tmp.put_u8(self.target_system);
24784        __tmp.put_u8(self.target_component);
24785        for val in &self.param_id {
24786            __tmp.put_u8(*val);
24787        }
24788        __tmp.put_u8(self.param_type as u8);
24789        if matches!(version, MavlinkVersion::V2) {
24790            let len = __tmp.len();
24791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24792        } else {
24793            __tmp.len()
24794        }
24795    }
24796}
24797#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24798#[doc = ""]
24799#[doc = "ID: 22"]
24800#[derive(Debug, Clone, PartialEq)]
24801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24803#[cfg_attr(feature = "ts", derive(TS))]
24804#[cfg_attr(feature = "ts", ts(export))]
24805pub struct PARAM_VALUE_DATA {
24806    #[doc = "Onboard parameter value"]
24807    pub param_value: f32,
24808    #[doc = "Total number of onboard parameters"]
24809    pub param_count: u16,
24810    #[doc = "Index of this onboard parameter"]
24811    pub param_index: u16,
24812    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24813    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24814    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24815    pub param_id: [u8; 16],
24816    #[doc = "Onboard parameter type."]
24817    pub param_type: MavParamType,
24818}
24819impl PARAM_VALUE_DATA {
24820    pub const ENCODED_LEN: usize = 25usize;
24821    pub const DEFAULT: Self = Self {
24822        param_value: 0.0_f32,
24823        param_count: 0_u16,
24824        param_index: 0_u16,
24825        param_id: [0_u8; 16usize],
24826        param_type: MavParamType::DEFAULT,
24827    };
24828    #[cfg(feature = "arbitrary")]
24829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24830        use arbitrary::{Arbitrary, Unstructured};
24831        let mut buf = [0u8; 1024];
24832        rng.fill_bytes(&mut buf);
24833        let mut unstructured = Unstructured::new(&buf);
24834        Self::arbitrary(&mut unstructured).unwrap_or_default()
24835    }
24836}
24837impl Default for PARAM_VALUE_DATA {
24838    fn default() -> Self {
24839        Self::DEFAULT.clone()
24840    }
24841}
24842impl MessageData for PARAM_VALUE_DATA {
24843    type Message = MavMessage;
24844    const ID: u32 = 22u32;
24845    const NAME: &'static str = "PARAM_VALUE";
24846    const EXTRA_CRC: u8 = 220u8;
24847    const ENCODED_LEN: usize = 25usize;
24848    fn deser(
24849        _version: MavlinkVersion,
24850        __input: &[u8],
24851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24852        let avail_len = __input.len();
24853        let mut payload_buf = [0; Self::ENCODED_LEN];
24854        let mut buf = if avail_len < Self::ENCODED_LEN {
24855            payload_buf[0..avail_len].copy_from_slice(__input);
24856            Bytes::new(&payload_buf)
24857        } else {
24858            Bytes::new(__input)
24859        };
24860        let mut __struct = Self::default();
24861        __struct.param_value = buf.get_f32_le();
24862        __struct.param_count = buf.get_u16_le();
24863        __struct.param_index = buf.get_u16_le();
24864        for v in &mut __struct.param_id {
24865            let val = buf.get_u8();
24866            *v = val;
24867        }
24868        let tmp = buf.get_u8();
24869        __struct.param_type =
24870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24871                enum_type: "MavParamType",
24872                value: tmp as u32,
24873            })?;
24874        Ok(__struct)
24875    }
24876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24877        let mut __tmp = BytesMut::new(bytes);
24878        #[allow(clippy::absurd_extreme_comparisons)]
24879        #[allow(unused_comparisons)]
24880        if __tmp.remaining() < Self::ENCODED_LEN {
24881            panic!(
24882                "buffer is too small (need {} bytes, but got {})",
24883                Self::ENCODED_LEN,
24884                __tmp.remaining(),
24885            )
24886        }
24887        __tmp.put_f32_le(self.param_value);
24888        __tmp.put_u16_le(self.param_count);
24889        __tmp.put_u16_le(self.param_index);
24890        for val in &self.param_id {
24891            __tmp.put_u8(*val);
24892        }
24893        __tmp.put_u8(self.param_type as u8);
24894        if matches!(version, MavlinkVersion::V2) {
24895            let len = __tmp.len();
24896            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24897        } else {
24898            __tmp.len()
24899        }
24900    }
24901}
24902#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24903#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24904#[doc = ""]
24905#[doc = "ID: 4"]
24906#[derive(Debug, Clone, PartialEq)]
24907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24909#[cfg_attr(feature = "ts", derive(TS))]
24910#[cfg_attr(feature = "ts", ts(export))]
24911pub struct PING_DATA {
24912    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24913    pub time_usec: u64,
24914    #[doc = "PING sequence"]
24915    pub seq: u32,
24916    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24917    pub target_system: u8,
24918    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24919    pub target_component: u8,
24920}
24921impl PING_DATA {
24922    pub const ENCODED_LEN: usize = 14usize;
24923    pub const DEFAULT: Self = Self {
24924        time_usec: 0_u64,
24925        seq: 0_u32,
24926        target_system: 0_u8,
24927        target_component: 0_u8,
24928    };
24929    #[cfg(feature = "arbitrary")]
24930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24931        use arbitrary::{Arbitrary, Unstructured};
24932        let mut buf = [0u8; 1024];
24933        rng.fill_bytes(&mut buf);
24934        let mut unstructured = Unstructured::new(&buf);
24935        Self::arbitrary(&mut unstructured).unwrap_or_default()
24936    }
24937}
24938impl Default for PING_DATA {
24939    fn default() -> Self {
24940        Self::DEFAULT.clone()
24941    }
24942}
24943impl MessageData for PING_DATA {
24944    type Message = MavMessage;
24945    const ID: u32 = 4u32;
24946    const NAME: &'static str = "PING";
24947    const EXTRA_CRC: u8 = 237u8;
24948    const ENCODED_LEN: usize = 14usize;
24949    fn deser(
24950        _version: MavlinkVersion,
24951        __input: &[u8],
24952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24953        let avail_len = __input.len();
24954        let mut payload_buf = [0; Self::ENCODED_LEN];
24955        let mut buf = if avail_len < Self::ENCODED_LEN {
24956            payload_buf[0..avail_len].copy_from_slice(__input);
24957            Bytes::new(&payload_buf)
24958        } else {
24959            Bytes::new(__input)
24960        };
24961        let mut __struct = Self::default();
24962        __struct.time_usec = buf.get_u64_le();
24963        __struct.seq = buf.get_u32_le();
24964        __struct.target_system = buf.get_u8();
24965        __struct.target_component = buf.get_u8();
24966        Ok(__struct)
24967    }
24968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24969        let mut __tmp = BytesMut::new(bytes);
24970        #[allow(clippy::absurd_extreme_comparisons)]
24971        #[allow(unused_comparisons)]
24972        if __tmp.remaining() < Self::ENCODED_LEN {
24973            panic!(
24974                "buffer is too small (need {} bytes, but got {})",
24975                Self::ENCODED_LEN,
24976                __tmp.remaining(),
24977            )
24978        }
24979        __tmp.put_u64_le(self.time_usec);
24980        __tmp.put_u32_le(self.seq);
24981        __tmp.put_u8(self.target_system);
24982        __tmp.put_u8(self.target_component);
24983        if matches!(version, MavlinkVersion::V2) {
24984            let len = __tmp.len();
24985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24986        } else {
24987            __tmp.len()
24988        }
24989    }
24990}
24991#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24992#[doc = "Control vehicle tone generation (buzzer)."]
24993#[doc = ""]
24994#[doc = "ID: 258"]
24995#[derive(Debug, Clone, PartialEq)]
24996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24998#[cfg_attr(feature = "ts", derive(TS))]
24999#[cfg_attr(feature = "ts", ts(export))]
25000pub struct PLAY_TUNE_DATA {
25001    #[doc = "System ID"]
25002    pub target_system: u8,
25003    #[doc = "Component ID"]
25004    pub target_component: u8,
25005    #[doc = "tune in board specific format"]
25006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25008    pub tune: [u8; 30],
25009    #[doc = "tune extension (appended to tune)"]
25010    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25011    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25012    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25013    pub tune2: [u8; 200],
25014}
25015impl PLAY_TUNE_DATA {
25016    pub const ENCODED_LEN: usize = 232usize;
25017    pub const DEFAULT: Self = Self {
25018        target_system: 0_u8,
25019        target_component: 0_u8,
25020        tune: [0_u8; 30usize],
25021        tune2: [0_u8; 200usize],
25022    };
25023    #[cfg(feature = "arbitrary")]
25024    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25025        use arbitrary::{Arbitrary, Unstructured};
25026        let mut buf = [0u8; 1024];
25027        rng.fill_bytes(&mut buf);
25028        let mut unstructured = Unstructured::new(&buf);
25029        Self::arbitrary(&mut unstructured).unwrap_or_default()
25030    }
25031}
25032impl Default for PLAY_TUNE_DATA {
25033    fn default() -> Self {
25034        Self::DEFAULT.clone()
25035    }
25036}
25037impl MessageData for PLAY_TUNE_DATA {
25038    type Message = MavMessage;
25039    const ID: u32 = 258u32;
25040    const NAME: &'static str = "PLAY_TUNE";
25041    const EXTRA_CRC: u8 = 187u8;
25042    const ENCODED_LEN: usize = 232usize;
25043    fn deser(
25044        _version: MavlinkVersion,
25045        __input: &[u8],
25046    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25047        let avail_len = __input.len();
25048        let mut payload_buf = [0; Self::ENCODED_LEN];
25049        let mut buf = if avail_len < Self::ENCODED_LEN {
25050            payload_buf[0..avail_len].copy_from_slice(__input);
25051            Bytes::new(&payload_buf)
25052        } else {
25053            Bytes::new(__input)
25054        };
25055        let mut __struct = Self::default();
25056        __struct.target_system = buf.get_u8();
25057        __struct.target_component = buf.get_u8();
25058        for v in &mut __struct.tune {
25059            let val = buf.get_u8();
25060            *v = val;
25061        }
25062        for v in &mut __struct.tune2 {
25063            let val = buf.get_u8();
25064            *v = val;
25065        }
25066        Ok(__struct)
25067    }
25068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25069        let mut __tmp = BytesMut::new(bytes);
25070        #[allow(clippy::absurd_extreme_comparisons)]
25071        #[allow(unused_comparisons)]
25072        if __tmp.remaining() < Self::ENCODED_LEN {
25073            panic!(
25074                "buffer is too small (need {} bytes, but got {})",
25075                Self::ENCODED_LEN,
25076                __tmp.remaining(),
25077            )
25078        }
25079        __tmp.put_u8(self.target_system);
25080        __tmp.put_u8(self.target_component);
25081        for val in &self.tune {
25082            __tmp.put_u8(*val);
25083        }
25084        if matches!(version, MavlinkVersion::V2) {
25085            for val in &self.tune2 {
25086                __tmp.put_u8(*val);
25087            }
25088            let len = __tmp.len();
25089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25090        } else {
25091            __tmp.len()
25092        }
25093    }
25094}
25095#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25096#[doc = ""]
25097#[doc = "ID: 400"]
25098#[derive(Debug, Clone, PartialEq)]
25099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25101#[cfg_attr(feature = "ts", derive(TS))]
25102#[cfg_attr(feature = "ts", ts(export))]
25103pub struct PLAY_TUNE_V2_DATA {
25104    #[doc = "Tune format"]
25105    pub format: TuneFormat,
25106    #[doc = "System ID"]
25107    pub target_system: u8,
25108    #[doc = "Component ID"]
25109    pub target_component: u8,
25110    #[doc = "Tune definition as a NULL-terminated string."]
25111    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25112    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25113    pub tune: [u8; 248],
25114}
25115impl PLAY_TUNE_V2_DATA {
25116    pub const ENCODED_LEN: usize = 254usize;
25117    pub const DEFAULT: Self = Self {
25118        format: TuneFormat::DEFAULT,
25119        target_system: 0_u8,
25120        target_component: 0_u8,
25121        tune: [0_u8; 248usize],
25122    };
25123    #[cfg(feature = "arbitrary")]
25124    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25125        use arbitrary::{Arbitrary, Unstructured};
25126        let mut buf = [0u8; 1024];
25127        rng.fill_bytes(&mut buf);
25128        let mut unstructured = Unstructured::new(&buf);
25129        Self::arbitrary(&mut unstructured).unwrap_or_default()
25130    }
25131}
25132impl Default for PLAY_TUNE_V2_DATA {
25133    fn default() -> Self {
25134        Self::DEFAULT.clone()
25135    }
25136}
25137impl MessageData for PLAY_TUNE_V2_DATA {
25138    type Message = MavMessage;
25139    const ID: u32 = 400u32;
25140    const NAME: &'static str = "PLAY_TUNE_V2";
25141    const EXTRA_CRC: u8 = 110u8;
25142    const ENCODED_LEN: usize = 254usize;
25143    fn deser(
25144        _version: MavlinkVersion,
25145        __input: &[u8],
25146    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25147        let avail_len = __input.len();
25148        let mut payload_buf = [0; Self::ENCODED_LEN];
25149        let mut buf = if avail_len < Self::ENCODED_LEN {
25150            payload_buf[0..avail_len].copy_from_slice(__input);
25151            Bytes::new(&payload_buf)
25152        } else {
25153            Bytes::new(__input)
25154        };
25155        let mut __struct = Self::default();
25156        let tmp = buf.get_u32_le();
25157        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25158            ::mavlink_core::error::ParserError::InvalidEnum {
25159                enum_type: "TuneFormat",
25160                value: tmp as u32,
25161            },
25162        )?;
25163        __struct.target_system = buf.get_u8();
25164        __struct.target_component = buf.get_u8();
25165        for v in &mut __struct.tune {
25166            let val = buf.get_u8();
25167            *v = val;
25168        }
25169        Ok(__struct)
25170    }
25171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25172        let mut __tmp = BytesMut::new(bytes);
25173        #[allow(clippy::absurd_extreme_comparisons)]
25174        #[allow(unused_comparisons)]
25175        if __tmp.remaining() < Self::ENCODED_LEN {
25176            panic!(
25177                "buffer is too small (need {} bytes, but got {})",
25178                Self::ENCODED_LEN,
25179                __tmp.remaining(),
25180            )
25181        }
25182        __tmp.put_u32_le(self.format as u32);
25183        __tmp.put_u8(self.target_system);
25184        __tmp.put_u8(self.target_component);
25185        for val in &self.tune {
25186            __tmp.put_u8(*val);
25187        }
25188        if matches!(version, MavlinkVersion::V2) {
25189            let len = __tmp.len();
25190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25191        } else {
25192            __tmp.len()
25193        }
25194    }
25195}
25196#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25197#[doc = ""]
25198#[doc = "ID: 87"]
25199#[derive(Debug, Clone, PartialEq)]
25200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25202#[cfg_attr(feature = "ts", derive(TS))]
25203#[cfg_attr(feature = "ts", ts(export))]
25204pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25205    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25206    pub time_boot_ms: u32,
25207    #[doc = "Latitude in WGS84 frame"]
25208    pub lat_int: i32,
25209    #[doc = "Longitude in WGS84 frame"]
25210    pub lon_int: i32,
25211    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25212    pub alt: f32,
25213    #[doc = "X velocity in NED frame"]
25214    pub vx: f32,
25215    #[doc = "Y velocity in NED frame"]
25216    pub vy: f32,
25217    #[doc = "Z velocity in NED frame"]
25218    pub vz: f32,
25219    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25220    pub afx: f32,
25221    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25222    pub afy: f32,
25223    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25224    pub afz: f32,
25225    #[doc = "yaw setpoint"]
25226    pub yaw: f32,
25227    #[doc = "yaw rate setpoint"]
25228    pub yaw_rate: f32,
25229    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25230    pub type_mask: PositionTargetTypemask,
25231    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25232    pub coordinate_frame: MavFrame,
25233}
25234impl POSITION_TARGET_GLOBAL_INT_DATA {
25235    pub const ENCODED_LEN: usize = 51usize;
25236    pub const DEFAULT: Self = Self {
25237        time_boot_ms: 0_u32,
25238        lat_int: 0_i32,
25239        lon_int: 0_i32,
25240        alt: 0.0_f32,
25241        vx: 0.0_f32,
25242        vy: 0.0_f32,
25243        vz: 0.0_f32,
25244        afx: 0.0_f32,
25245        afy: 0.0_f32,
25246        afz: 0.0_f32,
25247        yaw: 0.0_f32,
25248        yaw_rate: 0.0_f32,
25249        type_mask: PositionTargetTypemask::DEFAULT,
25250        coordinate_frame: MavFrame::DEFAULT,
25251    };
25252    #[cfg(feature = "arbitrary")]
25253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25254        use arbitrary::{Arbitrary, Unstructured};
25255        let mut buf = [0u8; 1024];
25256        rng.fill_bytes(&mut buf);
25257        let mut unstructured = Unstructured::new(&buf);
25258        Self::arbitrary(&mut unstructured).unwrap_or_default()
25259    }
25260}
25261impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25262    fn default() -> Self {
25263        Self::DEFAULT.clone()
25264    }
25265}
25266impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25267    type Message = MavMessage;
25268    const ID: u32 = 87u32;
25269    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25270    const EXTRA_CRC: u8 = 150u8;
25271    const ENCODED_LEN: usize = 51usize;
25272    fn deser(
25273        _version: MavlinkVersion,
25274        __input: &[u8],
25275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25276        let avail_len = __input.len();
25277        let mut payload_buf = [0; Self::ENCODED_LEN];
25278        let mut buf = if avail_len < Self::ENCODED_LEN {
25279            payload_buf[0..avail_len].copy_from_slice(__input);
25280            Bytes::new(&payload_buf)
25281        } else {
25282            Bytes::new(__input)
25283        };
25284        let mut __struct = Self::default();
25285        __struct.time_boot_ms = buf.get_u32_le();
25286        __struct.lat_int = buf.get_i32_le();
25287        __struct.lon_int = buf.get_i32_le();
25288        __struct.alt = buf.get_f32_le();
25289        __struct.vx = buf.get_f32_le();
25290        __struct.vy = buf.get_f32_le();
25291        __struct.vz = buf.get_f32_le();
25292        __struct.afx = buf.get_f32_le();
25293        __struct.afy = buf.get_f32_le();
25294        __struct.afz = buf.get_f32_le();
25295        __struct.yaw = buf.get_f32_le();
25296        __struct.yaw_rate = buf.get_f32_le();
25297        let tmp = buf.get_u16_le();
25298        __struct.type_mask = PositionTargetTypemask::from_bits(
25299            tmp & PositionTargetTypemask::all().bits(),
25300        )
25301        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25302            flag_type: "PositionTargetTypemask",
25303            value: tmp as u32,
25304        })?;
25305        let tmp = buf.get_u8();
25306        __struct.coordinate_frame =
25307            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25308                enum_type: "MavFrame",
25309                value: tmp as u32,
25310            })?;
25311        Ok(__struct)
25312    }
25313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25314        let mut __tmp = BytesMut::new(bytes);
25315        #[allow(clippy::absurd_extreme_comparisons)]
25316        #[allow(unused_comparisons)]
25317        if __tmp.remaining() < Self::ENCODED_LEN {
25318            panic!(
25319                "buffer is too small (need {} bytes, but got {})",
25320                Self::ENCODED_LEN,
25321                __tmp.remaining(),
25322            )
25323        }
25324        __tmp.put_u32_le(self.time_boot_ms);
25325        __tmp.put_i32_le(self.lat_int);
25326        __tmp.put_i32_le(self.lon_int);
25327        __tmp.put_f32_le(self.alt);
25328        __tmp.put_f32_le(self.vx);
25329        __tmp.put_f32_le(self.vy);
25330        __tmp.put_f32_le(self.vz);
25331        __tmp.put_f32_le(self.afx);
25332        __tmp.put_f32_le(self.afy);
25333        __tmp.put_f32_le(self.afz);
25334        __tmp.put_f32_le(self.yaw);
25335        __tmp.put_f32_le(self.yaw_rate);
25336        __tmp.put_u16_le(self.type_mask.bits());
25337        __tmp.put_u8(self.coordinate_frame as u8);
25338        if matches!(version, MavlinkVersion::V2) {
25339            let len = __tmp.len();
25340            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25341        } else {
25342            __tmp.len()
25343        }
25344    }
25345}
25346#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25347#[doc = ""]
25348#[doc = "ID: 85"]
25349#[derive(Debug, Clone, PartialEq)]
25350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25352#[cfg_attr(feature = "ts", derive(TS))]
25353#[cfg_attr(feature = "ts", ts(export))]
25354pub struct POSITION_TARGET_LOCAL_NED_DATA {
25355    #[doc = "Timestamp (time since system boot)."]
25356    pub time_boot_ms: u32,
25357    #[doc = "X Position in NED frame"]
25358    pub x: f32,
25359    #[doc = "Y Position in NED frame"]
25360    pub y: f32,
25361    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25362    pub z: f32,
25363    #[doc = "X velocity in NED frame"]
25364    pub vx: f32,
25365    #[doc = "Y velocity in NED frame"]
25366    pub vy: f32,
25367    #[doc = "Z velocity in NED frame"]
25368    pub vz: f32,
25369    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25370    pub afx: f32,
25371    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25372    pub afy: f32,
25373    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25374    pub afz: f32,
25375    #[doc = "yaw setpoint"]
25376    pub yaw: f32,
25377    #[doc = "yaw rate setpoint"]
25378    pub yaw_rate: f32,
25379    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25380    pub type_mask: PositionTargetTypemask,
25381    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25382    pub coordinate_frame: MavFrame,
25383}
25384impl POSITION_TARGET_LOCAL_NED_DATA {
25385    pub const ENCODED_LEN: usize = 51usize;
25386    pub const DEFAULT: Self = Self {
25387        time_boot_ms: 0_u32,
25388        x: 0.0_f32,
25389        y: 0.0_f32,
25390        z: 0.0_f32,
25391        vx: 0.0_f32,
25392        vy: 0.0_f32,
25393        vz: 0.0_f32,
25394        afx: 0.0_f32,
25395        afy: 0.0_f32,
25396        afz: 0.0_f32,
25397        yaw: 0.0_f32,
25398        yaw_rate: 0.0_f32,
25399        type_mask: PositionTargetTypemask::DEFAULT,
25400        coordinate_frame: MavFrame::DEFAULT,
25401    };
25402    #[cfg(feature = "arbitrary")]
25403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25404        use arbitrary::{Arbitrary, Unstructured};
25405        let mut buf = [0u8; 1024];
25406        rng.fill_bytes(&mut buf);
25407        let mut unstructured = Unstructured::new(&buf);
25408        Self::arbitrary(&mut unstructured).unwrap_or_default()
25409    }
25410}
25411impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25412    fn default() -> Self {
25413        Self::DEFAULT.clone()
25414    }
25415}
25416impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25417    type Message = MavMessage;
25418    const ID: u32 = 85u32;
25419    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25420    const EXTRA_CRC: u8 = 140u8;
25421    const ENCODED_LEN: usize = 51usize;
25422    fn deser(
25423        _version: MavlinkVersion,
25424        __input: &[u8],
25425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25426        let avail_len = __input.len();
25427        let mut payload_buf = [0; Self::ENCODED_LEN];
25428        let mut buf = if avail_len < Self::ENCODED_LEN {
25429            payload_buf[0..avail_len].copy_from_slice(__input);
25430            Bytes::new(&payload_buf)
25431        } else {
25432            Bytes::new(__input)
25433        };
25434        let mut __struct = Self::default();
25435        __struct.time_boot_ms = buf.get_u32_le();
25436        __struct.x = buf.get_f32_le();
25437        __struct.y = buf.get_f32_le();
25438        __struct.z = buf.get_f32_le();
25439        __struct.vx = buf.get_f32_le();
25440        __struct.vy = buf.get_f32_le();
25441        __struct.vz = buf.get_f32_le();
25442        __struct.afx = buf.get_f32_le();
25443        __struct.afy = buf.get_f32_le();
25444        __struct.afz = buf.get_f32_le();
25445        __struct.yaw = buf.get_f32_le();
25446        __struct.yaw_rate = buf.get_f32_le();
25447        let tmp = buf.get_u16_le();
25448        __struct.type_mask = PositionTargetTypemask::from_bits(
25449            tmp & PositionTargetTypemask::all().bits(),
25450        )
25451        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25452            flag_type: "PositionTargetTypemask",
25453            value: tmp as u32,
25454        })?;
25455        let tmp = buf.get_u8();
25456        __struct.coordinate_frame =
25457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25458                enum_type: "MavFrame",
25459                value: tmp as u32,
25460            })?;
25461        Ok(__struct)
25462    }
25463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25464        let mut __tmp = BytesMut::new(bytes);
25465        #[allow(clippy::absurd_extreme_comparisons)]
25466        #[allow(unused_comparisons)]
25467        if __tmp.remaining() < Self::ENCODED_LEN {
25468            panic!(
25469                "buffer is too small (need {} bytes, but got {})",
25470                Self::ENCODED_LEN,
25471                __tmp.remaining(),
25472            )
25473        }
25474        __tmp.put_u32_le(self.time_boot_ms);
25475        __tmp.put_f32_le(self.x);
25476        __tmp.put_f32_le(self.y);
25477        __tmp.put_f32_le(self.z);
25478        __tmp.put_f32_le(self.vx);
25479        __tmp.put_f32_le(self.vy);
25480        __tmp.put_f32_le(self.vz);
25481        __tmp.put_f32_le(self.afx);
25482        __tmp.put_f32_le(self.afy);
25483        __tmp.put_f32_le(self.afz);
25484        __tmp.put_f32_le(self.yaw);
25485        __tmp.put_f32_le(self.yaw_rate);
25486        __tmp.put_u16_le(self.type_mask.bits());
25487        __tmp.put_u8(self.coordinate_frame as u8);
25488        if matches!(version, MavlinkVersion::V2) {
25489            let len = __tmp.len();
25490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25491        } else {
25492            __tmp.len()
25493        }
25494    }
25495}
25496#[doc = "Power supply status."]
25497#[doc = ""]
25498#[doc = "ID: 125"]
25499#[derive(Debug, Clone, PartialEq)]
25500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25502#[cfg_attr(feature = "ts", derive(TS))]
25503#[cfg_attr(feature = "ts", ts(export))]
25504pub struct POWER_STATUS_DATA {
25505    #[doc = "5V rail voltage."]
25506    pub Vcc: u16,
25507    #[doc = "Servo rail voltage."]
25508    pub Vservo: u16,
25509    #[doc = "Bitmap of power supply status flags."]
25510    pub flags: MavPowerStatus,
25511}
25512impl POWER_STATUS_DATA {
25513    pub const ENCODED_LEN: usize = 6usize;
25514    pub const DEFAULT: Self = Self {
25515        Vcc: 0_u16,
25516        Vservo: 0_u16,
25517        flags: MavPowerStatus::DEFAULT,
25518    };
25519    #[cfg(feature = "arbitrary")]
25520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25521        use arbitrary::{Arbitrary, Unstructured};
25522        let mut buf = [0u8; 1024];
25523        rng.fill_bytes(&mut buf);
25524        let mut unstructured = Unstructured::new(&buf);
25525        Self::arbitrary(&mut unstructured).unwrap_or_default()
25526    }
25527}
25528impl Default for POWER_STATUS_DATA {
25529    fn default() -> Self {
25530        Self::DEFAULT.clone()
25531    }
25532}
25533impl MessageData for POWER_STATUS_DATA {
25534    type Message = MavMessage;
25535    const ID: u32 = 125u32;
25536    const NAME: &'static str = "POWER_STATUS";
25537    const EXTRA_CRC: u8 = 203u8;
25538    const ENCODED_LEN: usize = 6usize;
25539    fn deser(
25540        _version: MavlinkVersion,
25541        __input: &[u8],
25542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25543        let avail_len = __input.len();
25544        let mut payload_buf = [0; Self::ENCODED_LEN];
25545        let mut buf = if avail_len < Self::ENCODED_LEN {
25546            payload_buf[0..avail_len].copy_from_slice(__input);
25547            Bytes::new(&payload_buf)
25548        } else {
25549            Bytes::new(__input)
25550        };
25551        let mut __struct = Self::default();
25552        __struct.Vcc = buf.get_u16_le();
25553        __struct.Vservo = buf.get_u16_le();
25554        let tmp = buf.get_u16_le();
25555        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
25556            ::mavlink_core::error::ParserError::InvalidFlag {
25557                flag_type: "MavPowerStatus",
25558                value: tmp as u32,
25559            },
25560        )?;
25561        Ok(__struct)
25562    }
25563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25564        let mut __tmp = BytesMut::new(bytes);
25565        #[allow(clippy::absurd_extreme_comparisons)]
25566        #[allow(unused_comparisons)]
25567        if __tmp.remaining() < Self::ENCODED_LEN {
25568            panic!(
25569                "buffer is too small (need {} bytes, but got {})",
25570                Self::ENCODED_LEN,
25571                __tmp.remaining(),
25572            )
25573        }
25574        __tmp.put_u16_le(self.Vcc);
25575        __tmp.put_u16_le(self.Vservo);
25576        __tmp.put_u16_le(self.flags.bits());
25577        if matches!(version, MavlinkVersion::V2) {
25578            let len = __tmp.len();
25579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25580        } else {
25581            __tmp.len()
25582        }
25583    }
25584}
25585#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25586#[doc = ""]
25587#[doc = "ID: 300"]
25588#[derive(Debug, Clone, PartialEq)]
25589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25591#[cfg_attr(feature = "ts", derive(TS))]
25592#[cfg_attr(feature = "ts", ts(export))]
25593pub struct PROTOCOL_VERSION_DATA {
25594    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25595    pub version: u16,
25596    #[doc = "Minimum MAVLink version supported"]
25597    pub min_version: u16,
25598    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25599    pub max_version: u16,
25600    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25602    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25603    pub spec_version_hash: [u8; 8],
25604    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25605    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25606    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25607    pub library_version_hash: [u8; 8],
25608}
25609impl PROTOCOL_VERSION_DATA {
25610    pub const ENCODED_LEN: usize = 22usize;
25611    pub const DEFAULT: Self = Self {
25612        version: 0_u16,
25613        min_version: 0_u16,
25614        max_version: 0_u16,
25615        spec_version_hash: [0_u8; 8usize],
25616        library_version_hash: [0_u8; 8usize],
25617    };
25618    #[cfg(feature = "arbitrary")]
25619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25620        use arbitrary::{Arbitrary, Unstructured};
25621        let mut buf = [0u8; 1024];
25622        rng.fill_bytes(&mut buf);
25623        let mut unstructured = Unstructured::new(&buf);
25624        Self::arbitrary(&mut unstructured).unwrap_or_default()
25625    }
25626}
25627impl Default for PROTOCOL_VERSION_DATA {
25628    fn default() -> Self {
25629        Self::DEFAULT.clone()
25630    }
25631}
25632impl MessageData for PROTOCOL_VERSION_DATA {
25633    type Message = MavMessage;
25634    const ID: u32 = 300u32;
25635    const NAME: &'static str = "PROTOCOL_VERSION";
25636    const EXTRA_CRC: u8 = 217u8;
25637    const ENCODED_LEN: usize = 22usize;
25638    fn deser(
25639        _version: MavlinkVersion,
25640        __input: &[u8],
25641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25642        let avail_len = __input.len();
25643        let mut payload_buf = [0; Self::ENCODED_LEN];
25644        let mut buf = if avail_len < Self::ENCODED_LEN {
25645            payload_buf[0..avail_len].copy_from_slice(__input);
25646            Bytes::new(&payload_buf)
25647        } else {
25648            Bytes::new(__input)
25649        };
25650        let mut __struct = Self::default();
25651        __struct.version = buf.get_u16_le();
25652        __struct.min_version = buf.get_u16_le();
25653        __struct.max_version = buf.get_u16_le();
25654        for v in &mut __struct.spec_version_hash {
25655            let val = buf.get_u8();
25656            *v = val;
25657        }
25658        for v in &mut __struct.library_version_hash {
25659            let val = buf.get_u8();
25660            *v = val;
25661        }
25662        Ok(__struct)
25663    }
25664    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25665        let mut __tmp = BytesMut::new(bytes);
25666        #[allow(clippy::absurd_extreme_comparisons)]
25667        #[allow(unused_comparisons)]
25668        if __tmp.remaining() < Self::ENCODED_LEN {
25669            panic!(
25670                "buffer is too small (need {} bytes, but got {})",
25671                Self::ENCODED_LEN,
25672                __tmp.remaining(),
25673            )
25674        }
25675        __tmp.put_u16_le(self.version);
25676        __tmp.put_u16_le(self.min_version);
25677        __tmp.put_u16_le(self.max_version);
25678        for val in &self.spec_version_hash {
25679            __tmp.put_u8(*val);
25680        }
25681        for val in &self.library_version_hash {
25682            __tmp.put_u8(*val);
25683        }
25684        if matches!(version, MavlinkVersion::V2) {
25685            let len = __tmp.len();
25686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25687        } else {
25688            __tmp.len()
25689        }
25690    }
25691}
25692#[doc = "RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS).         Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller.         The target_system field should normally be set to the system id of the system to control, typically the flight controller.         The target_component field can normally be set to 0, so that all components of the system can receive the message.         The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field.         The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain.         The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled).         The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent).         The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost).         In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver).         For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data.         Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming."]
25693#[doc = ""]
25694#[doc = "ID: 420"]
25695#[derive(Debug, Clone, PartialEq)]
25696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25698#[cfg_attr(feature = "ts", derive(TS))]
25699#[cfg_attr(feature = "ts", ts(export))]
25700pub struct RADIO_RC_CHANNELS_DATA {
25701    #[doc = "Time when the data in the channels field were last updated (time since boot in the receiver's time domain)."]
25702    pub time_last_update_ms: u32,
25703    #[doc = "Radio RC channels status flags."]
25704    pub flags: RadioRcChannelsFlags,
25705    #[doc = "System ID (ID of target system, normally flight controller)."]
25706    pub target_system: u8,
25707    #[doc = "Component ID (normally 0 for broadcast)."]
25708    pub target_component: u8,
25709    #[doc = "Total number of RC channels being received. This can be larger than 32, indicating that more channels are available but not given in this message."]
25710    pub count: u8,
25711    #[doc = "RC channels.         Channel values are in centered 13 bit format. Range is -4096 to 4096, center is 0. Conversion to PWM is x * 5/32 + 1500.         Channels with indexes equal or above count should be set to 0, to benefit from MAVLink's trailing-zero trimming."]
25712    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25713    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25714    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25715    pub channels: [i16; 32],
25716}
25717impl RADIO_RC_CHANNELS_DATA {
25718    pub const ENCODED_LEN: usize = 73usize;
25719    pub const DEFAULT: Self = Self {
25720        time_last_update_ms: 0_u32,
25721        flags: RadioRcChannelsFlags::DEFAULT,
25722        target_system: 0_u8,
25723        target_component: 0_u8,
25724        count: 0_u8,
25725        channels: [0_i16; 32usize],
25726    };
25727    #[cfg(feature = "arbitrary")]
25728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25729        use arbitrary::{Arbitrary, Unstructured};
25730        let mut buf = [0u8; 1024];
25731        rng.fill_bytes(&mut buf);
25732        let mut unstructured = Unstructured::new(&buf);
25733        Self::arbitrary(&mut unstructured).unwrap_or_default()
25734    }
25735}
25736impl Default for RADIO_RC_CHANNELS_DATA {
25737    fn default() -> Self {
25738        Self::DEFAULT.clone()
25739    }
25740}
25741impl MessageData for RADIO_RC_CHANNELS_DATA {
25742    type Message = MavMessage;
25743    const ID: u32 = 420u32;
25744    const NAME: &'static str = "RADIO_RC_CHANNELS";
25745    const EXTRA_CRC: u8 = 20u8;
25746    const ENCODED_LEN: usize = 73usize;
25747    fn deser(
25748        _version: MavlinkVersion,
25749        __input: &[u8],
25750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25751        let avail_len = __input.len();
25752        let mut payload_buf = [0; Self::ENCODED_LEN];
25753        let mut buf = if avail_len < Self::ENCODED_LEN {
25754            payload_buf[0..avail_len].copy_from_slice(__input);
25755            Bytes::new(&payload_buf)
25756        } else {
25757            Bytes::new(__input)
25758        };
25759        let mut __struct = Self::default();
25760        __struct.time_last_update_ms = buf.get_u32_le();
25761        let tmp = buf.get_u16_le();
25762        __struct.flags = RadioRcChannelsFlags::from_bits(tmp & RadioRcChannelsFlags::all().bits())
25763            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25764                flag_type: "RadioRcChannelsFlags",
25765                value: tmp as u32,
25766            })?;
25767        __struct.target_system = buf.get_u8();
25768        __struct.target_component = buf.get_u8();
25769        __struct.count = buf.get_u8();
25770        for v in &mut __struct.channels {
25771            let val = buf.get_i16_le();
25772            *v = val;
25773        }
25774        Ok(__struct)
25775    }
25776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25777        let mut __tmp = BytesMut::new(bytes);
25778        #[allow(clippy::absurd_extreme_comparisons)]
25779        #[allow(unused_comparisons)]
25780        if __tmp.remaining() < Self::ENCODED_LEN {
25781            panic!(
25782                "buffer is too small (need {} bytes, but got {})",
25783                Self::ENCODED_LEN,
25784                __tmp.remaining(),
25785            )
25786        }
25787        __tmp.put_u32_le(self.time_last_update_ms);
25788        __tmp.put_u16_le(self.flags.bits());
25789        __tmp.put_u8(self.target_system);
25790        __tmp.put_u8(self.target_component);
25791        __tmp.put_u8(self.count);
25792        if matches!(version, MavlinkVersion::V2) {
25793            for val in &self.channels {
25794                __tmp.put_i16_le(*val);
25795            }
25796            let len = __tmp.len();
25797            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25798        } else {
25799            __tmp.len()
25800        }
25801    }
25802}
25803#[doc = "Status generated by radio and injected into MAVLink stream."]
25804#[doc = ""]
25805#[doc = "ID: 109"]
25806#[derive(Debug, Clone, PartialEq)]
25807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25809#[cfg_attr(feature = "ts", derive(TS))]
25810#[cfg_attr(feature = "ts", ts(export))]
25811pub struct RADIO_STATUS_DATA {
25812    #[doc = "Count of radio packet receive errors (since boot)."]
25813    pub rxerrors: u16,
25814    #[doc = "Count of error corrected radio packets (since boot)."]
25815    pub fixed: u16,
25816    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25817    pub rssi: u8,
25818    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25819    pub remrssi: u8,
25820    #[doc = "Remaining free transmitter buffer space."]
25821    pub txbuf: u8,
25822    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25823    pub noise: u8,
25824    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25825    pub remnoise: u8,
25826}
25827impl RADIO_STATUS_DATA {
25828    pub const ENCODED_LEN: usize = 9usize;
25829    pub const DEFAULT: Self = Self {
25830        rxerrors: 0_u16,
25831        fixed: 0_u16,
25832        rssi: 0_u8,
25833        remrssi: 0_u8,
25834        txbuf: 0_u8,
25835        noise: 0_u8,
25836        remnoise: 0_u8,
25837    };
25838    #[cfg(feature = "arbitrary")]
25839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25840        use arbitrary::{Arbitrary, Unstructured};
25841        let mut buf = [0u8; 1024];
25842        rng.fill_bytes(&mut buf);
25843        let mut unstructured = Unstructured::new(&buf);
25844        Self::arbitrary(&mut unstructured).unwrap_or_default()
25845    }
25846}
25847impl Default for RADIO_STATUS_DATA {
25848    fn default() -> Self {
25849        Self::DEFAULT.clone()
25850    }
25851}
25852impl MessageData for RADIO_STATUS_DATA {
25853    type Message = MavMessage;
25854    const ID: u32 = 109u32;
25855    const NAME: &'static str = "RADIO_STATUS";
25856    const EXTRA_CRC: u8 = 185u8;
25857    const ENCODED_LEN: usize = 9usize;
25858    fn deser(
25859        _version: MavlinkVersion,
25860        __input: &[u8],
25861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25862        let avail_len = __input.len();
25863        let mut payload_buf = [0; Self::ENCODED_LEN];
25864        let mut buf = if avail_len < Self::ENCODED_LEN {
25865            payload_buf[0..avail_len].copy_from_slice(__input);
25866            Bytes::new(&payload_buf)
25867        } else {
25868            Bytes::new(__input)
25869        };
25870        let mut __struct = Self::default();
25871        __struct.rxerrors = buf.get_u16_le();
25872        __struct.fixed = buf.get_u16_le();
25873        __struct.rssi = buf.get_u8();
25874        __struct.remrssi = buf.get_u8();
25875        __struct.txbuf = buf.get_u8();
25876        __struct.noise = buf.get_u8();
25877        __struct.remnoise = buf.get_u8();
25878        Ok(__struct)
25879    }
25880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25881        let mut __tmp = BytesMut::new(bytes);
25882        #[allow(clippy::absurd_extreme_comparisons)]
25883        #[allow(unused_comparisons)]
25884        if __tmp.remaining() < Self::ENCODED_LEN {
25885            panic!(
25886                "buffer is too small (need {} bytes, but got {})",
25887                Self::ENCODED_LEN,
25888                __tmp.remaining(),
25889            )
25890        }
25891        __tmp.put_u16_le(self.rxerrors);
25892        __tmp.put_u16_le(self.fixed);
25893        __tmp.put_u8(self.rssi);
25894        __tmp.put_u8(self.remrssi);
25895        __tmp.put_u8(self.txbuf);
25896        __tmp.put_u8(self.noise);
25897        __tmp.put_u8(self.remnoise);
25898        if matches!(version, MavlinkVersion::V2) {
25899            let len = __tmp.len();
25900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25901        } else {
25902            __tmp.len()
25903        }
25904    }
25905}
25906#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25907#[doc = ""]
25908#[doc = "ID: 27"]
25909#[derive(Debug, Clone, PartialEq)]
25910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25912#[cfg_attr(feature = "ts", derive(TS))]
25913#[cfg_attr(feature = "ts", ts(export))]
25914pub struct RAW_IMU_DATA {
25915    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25916    pub time_usec: u64,
25917    #[doc = "X acceleration (raw)"]
25918    pub xacc: i16,
25919    #[doc = "Y acceleration (raw)"]
25920    pub yacc: i16,
25921    #[doc = "Z acceleration (raw)"]
25922    pub zacc: i16,
25923    #[doc = "Angular speed around X axis (raw)"]
25924    pub xgyro: i16,
25925    #[doc = "Angular speed around Y axis (raw)"]
25926    pub ygyro: i16,
25927    #[doc = "Angular speed around Z axis (raw)"]
25928    pub zgyro: i16,
25929    #[doc = "X Magnetic field (raw)"]
25930    pub xmag: i16,
25931    #[doc = "Y Magnetic field (raw)"]
25932    pub ymag: i16,
25933    #[doc = "Z Magnetic field (raw)"]
25934    pub zmag: i16,
25935    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25936    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25937    pub id: u8,
25938    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25939    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25940    pub temperature: i16,
25941}
25942impl RAW_IMU_DATA {
25943    pub const ENCODED_LEN: usize = 29usize;
25944    pub const DEFAULT: Self = Self {
25945        time_usec: 0_u64,
25946        xacc: 0_i16,
25947        yacc: 0_i16,
25948        zacc: 0_i16,
25949        xgyro: 0_i16,
25950        ygyro: 0_i16,
25951        zgyro: 0_i16,
25952        xmag: 0_i16,
25953        ymag: 0_i16,
25954        zmag: 0_i16,
25955        id: 0_u8,
25956        temperature: 0_i16,
25957    };
25958    #[cfg(feature = "arbitrary")]
25959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25960        use arbitrary::{Arbitrary, Unstructured};
25961        let mut buf = [0u8; 1024];
25962        rng.fill_bytes(&mut buf);
25963        let mut unstructured = Unstructured::new(&buf);
25964        Self::arbitrary(&mut unstructured).unwrap_or_default()
25965    }
25966}
25967impl Default for RAW_IMU_DATA {
25968    fn default() -> Self {
25969        Self::DEFAULT.clone()
25970    }
25971}
25972impl MessageData for RAW_IMU_DATA {
25973    type Message = MavMessage;
25974    const ID: u32 = 27u32;
25975    const NAME: &'static str = "RAW_IMU";
25976    const EXTRA_CRC: u8 = 144u8;
25977    const ENCODED_LEN: usize = 29usize;
25978    fn deser(
25979        _version: MavlinkVersion,
25980        __input: &[u8],
25981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25982        let avail_len = __input.len();
25983        let mut payload_buf = [0; Self::ENCODED_LEN];
25984        let mut buf = if avail_len < Self::ENCODED_LEN {
25985            payload_buf[0..avail_len].copy_from_slice(__input);
25986            Bytes::new(&payload_buf)
25987        } else {
25988            Bytes::new(__input)
25989        };
25990        let mut __struct = Self::default();
25991        __struct.time_usec = buf.get_u64_le();
25992        __struct.xacc = buf.get_i16_le();
25993        __struct.yacc = buf.get_i16_le();
25994        __struct.zacc = buf.get_i16_le();
25995        __struct.xgyro = buf.get_i16_le();
25996        __struct.ygyro = buf.get_i16_le();
25997        __struct.zgyro = buf.get_i16_le();
25998        __struct.xmag = buf.get_i16_le();
25999        __struct.ymag = buf.get_i16_le();
26000        __struct.zmag = buf.get_i16_le();
26001        __struct.id = buf.get_u8();
26002        __struct.temperature = buf.get_i16_le();
26003        Ok(__struct)
26004    }
26005    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26006        let mut __tmp = BytesMut::new(bytes);
26007        #[allow(clippy::absurd_extreme_comparisons)]
26008        #[allow(unused_comparisons)]
26009        if __tmp.remaining() < Self::ENCODED_LEN {
26010            panic!(
26011                "buffer is too small (need {} bytes, but got {})",
26012                Self::ENCODED_LEN,
26013                __tmp.remaining(),
26014            )
26015        }
26016        __tmp.put_u64_le(self.time_usec);
26017        __tmp.put_i16_le(self.xacc);
26018        __tmp.put_i16_le(self.yacc);
26019        __tmp.put_i16_le(self.zacc);
26020        __tmp.put_i16_le(self.xgyro);
26021        __tmp.put_i16_le(self.ygyro);
26022        __tmp.put_i16_le(self.zgyro);
26023        __tmp.put_i16_le(self.xmag);
26024        __tmp.put_i16_le(self.ymag);
26025        __tmp.put_i16_le(self.zmag);
26026        if matches!(version, MavlinkVersion::V2) {
26027            __tmp.put_u8(self.id);
26028            __tmp.put_i16_le(self.temperature);
26029            let len = __tmp.len();
26030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26031        } else {
26032            __tmp.len()
26033        }
26034    }
26035}
26036#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
26037#[doc = ""]
26038#[doc = "ID: 28"]
26039#[derive(Debug, Clone, PartialEq)]
26040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26042#[cfg_attr(feature = "ts", derive(TS))]
26043#[cfg_attr(feature = "ts", ts(export))]
26044pub struct RAW_PRESSURE_DATA {
26045    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26046    pub time_usec: u64,
26047    #[doc = "Absolute pressure (raw)"]
26048    pub press_abs: i16,
26049    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
26050    pub press_diff1: i16,
26051    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
26052    pub press_diff2: i16,
26053    #[doc = "Raw Temperature measurement (raw)"]
26054    pub temperature: i16,
26055}
26056impl RAW_PRESSURE_DATA {
26057    pub const ENCODED_LEN: usize = 16usize;
26058    pub const DEFAULT: Self = Self {
26059        time_usec: 0_u64,
26060        press_abs: 0_i16,
26061        press_diff1: 0_i16,
26062        press_diff2: 0_i16,
26063        temperature: 0_i16,
26064    };
26065    #[cfg(feature = "arbitrary")]
26066    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26067        use arbitrary::{Arbitrary, Unstructured};
26068        let mut buf = [0u8; 1024];
26069        rng.fill_bytes(&mut buf);
26070        let mut unstructured = Unstructured::new(&buf);
26071        Self::arbitrary(&mut unstructured).unwrap_or_default()
26072    }
26073}
26074impl Default for RAW_PRESSURE_DATA {
26075    fn default() -> Self {
26076        Self::DEFAULT.clone()
26077    }
26078}
26079impl MessageData for RAW_PRESSURE_DATA {
26080    type Message = MavMessage;
26081    const ID: u32 = 28u32;
26082    const NAME: &'static str = "RAW_PRESSURE";
26083    const EXTRA_CRC: u8 = 67u8;
26084    const ENCODED_LEN: usize = 16usize;
26085    fn deser(
26086        _version: MavlinkVersion,
26087        __input: &[u8],
26088    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26089        let avail_len = __input.len();
26090        let mut payload_buf = [0; Self::ENCODED_LEN];
26091        let mut buf = if avail_len < Self::ENCODED_LEN {
26092            payload_buf[0..avail_len].copy_from_slice(__input);
26093            Bytes::new(&payload_buf)
26094        } else {
26095            Bytes::new(__input)
26096        };
26097        let mut __struct = Self::default();
26098        __struct.time_usec = buf.get_u64_le();
26099        __struct.press_abs = buf.get_i16_le();
26100        __struct.press_diff1 = buf.get_i16_le();
26101        __struct.press_diff2 = buf.get_i16_le();
26102        __struct.temperature = buf.get_i16_le();
26103        Ok(__struct)
26104    }
26105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26106        let mut __tmp = BytesMut::new(bytes);
26107        #[allow(clippy::absurd_extreme_comparisons)]
26108        #[allow(unused_comparisons)]
26109        if __tmp.remaining() < Self::ENCODED_LEN {
26110            panic!(
26111                "buffer is too small (need {} bytes, but got {})",
26112                Self::ENCODED_LEN,
26113                __tmp.remaining(),
26114            )
26115        }
26116        __tmp.put_u64_le(self.time_usec);
26117        __tmp.put_i16_le(self.press_abs);
26118        __tmp.put_i16_le(self.press_diff1);
26119        __tmp.put_i16_le(self.press_diff2);
26120        __tmp.put_i16_le(self.temperature);
26121        if matches!(version, MavlinkVersion::V2) {
26122            let len = __tmp.len();
26123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26124        } else {
26125            __tmp.len()
26126        }
26127    }
26128}
26129#[doc = "RPM sensor data message."]
26130#[doc = ""]
26131#[doc = "ID: 339"]
26132#[derive(Debug, Clone, PartialEq)]
26133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26135#[cfg_attr(feature = "ts", derive(TS))]
26136#[cfg_attr(feature = "ts", ts(export))]
26137pub struct RAW_RPM_DATA {
26138    #[doc = "Indicated rate"]
26139    pub frequency: f32,
26140    #[doc = "Index of this RPM sensor (0-indexed)"]
26141    pub index: u8,
26142}
26143impl RAW_RPM_DATA {
26144    pub const ENCODED_LEN: usize = 5usize;
26145    pub const DEFAULT: Self = Self {
26146        frequency: 0.0_f32,
26147        index: 0_u8,
26148    };
26149    #[cfg(feature = "arbitrary")]
26150    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26151        use arbitrary::{Arbitrary, Unstructured};
26152        let mut buf = [0u8; 1024];
26153        rng.fill_bytes(&mut buf);
26154        let mut unstructured = Unstructured::new(&buf);
26155        Self::arbitrary(&mut unstructured).unwrap_or_default()
26156    }
26157}
26158impl Default for RAW_RPM_DATA {
26159    fn default() -> Self {
26160        Self::DEFAULT.clone()
26161    }
26162}
26163impl MessageData for RAW_RPM_DATA {
26164    type Message = MavMessage;
26165    const ID: u32 = 339u32;
26166    const NAME: &'static str = "RAW_RPM";
26167    const EXTRA_CRC: u8 = 199u8;
26168    const ENCODED_LEN: usize = 5usize;
26169    fn deser(
26170        _version: MavlinkVersion,
26171        __input: &[u8],
26172    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26173        let avail_len = __input.len();
26174        let mut payload_buf = [0; Self::ENCODED_LEN];
26175        let mut buf = if avail_len < Self::ENCODED_LEN {
26176            payload_buf[0..avail_len].copy_from_slice(__input);
26177            Bytes::new(&payload_buf)
26178        } else {
26179            Bytes::new(__input)
26180        };
26181        let mut __struct = Self::default();
26182        __struct.frequency = buf.get_f32_le();
26183        __struct.index = buf.get_u8();
26184        Ok(__struct)
26185    }
26186    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26187        let mut __tmp = BytesMut::new(bytes);
26188        #[allow(clippy::absurd_extreme_comparisons)]
26189        #[allow(unused_comparisons)]
26190        if __tmp.remaining() < Self::ENCODED_LEN {
26191            panic!(
26192                "buffer is too small (need {} bytes, but got {})",
26193                Self::ENCODED_LEN,
26194                __tmp.remaining(),
26195            )
26196        }
26197        __tmp.put_f32_le(self.frequency);
26198        __tmp.put_u8(self.index);
26199        if matches!(version, MavlinkVersion::V2) {
26200            let len = __tmp.len();
26201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26202        } else {
26203            __tmp.len()
26204        }
26205    }
26206}
26207#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26208#[doc = ""]
26209#[doc = "ID: 65"]
26210#[derive(Debug, Clone, PartialEq)]
26211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26213#[cfg_attr(feature = "ts", derive(TS))]
26214#[cfg_attr(feature = "ts", ts(export))]
26215pub struct RC_CHANNELS_DATA {
26216    #[doc = "Timestamp (time since system boot)."]
26217    pub time_boot_ms: u32,
26218    #[doc = "RC channel 1 value."]
26219    pub chan1_raw: u16,
26220    #[doc = "RC channel 2 value."]
26221    pub chan2_raw: u16,
26222    #[doc = "RC channel 3 value."]
26223    pub chan3_raw: u16,
26224    #[doc = "RC channel 4 value."]
26225    pub chan4_raw: u16,
26226    #[doc = "RC channel 5 value."]
26227    pub chan5_raw: u16,
26228    #[doc = "RC channel 6 value."]
26229    pub chan6_raw: u16,
26230    #[doc = "RC channel 7 value."]
26231    pub chan7_raw: u16,
26232    #[doc = "RC channel 8 value."]
26233    pub chan8_raw: u16,
26234    #[doc = "RC channel 9 value."]
26235    pub chan9_raw: u16,
26236    #[doc = "RC channel 10 value."]
26237    pub chan10_raw: u16,
26238    #[doc = "RC channel 11 value."]
26239    pub chan11_raw: u16,
26240    #[doc = "RC channel 12 value."]
26241    pub chan12_raw: u16,
26242    #[doc = "RC channel 13 value."]
26243    pub chan13_raw: u16,
26244    #[doc = "RC channel 14 value."]
26245    pub chan14_raw: u16,
26246    #[doc = "RC channel 15 value."]
26247    pub chan15_raw: u16,
26248    #[doc = "RC channel 16 value."]
26249    pub chan16_raw: u16,
26250    #[doc = "RC channel 17 value."]
26251    pub chan17_raw: u16,
26252    #[doc = "RC channel 18 value."]
26253    pub chan18_raw: u16,
26254    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26255    pub chancount: u8,
26256    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26257    pub rssi: u8,
26258}
26259impl RC_CHANNELS_DATA {
26260    pub const ENCODED_LEN: usize = 42usize;
26261    pub const DEFAULT: Self = Self {
26262        time_boot_ms: 0_u32,
26263        chan1_raw: 0_u16,
26264        chan2_raw: 0_u16,
26265        chan3_raw: 0_u16,
26266        chan4_raw: 0_u16,
26267        chan5_raw: 0_u16,
26268        chan6_raw: 0_u16,
26269        chan7_raw: 0_u16,
26270        chan8_raw: 0_u16,
26271        chan9_raw: 0_u16,
26272        chan10_raw: 0_u16,
26273        chan11_raw: 0_u16,
26274        chan12_raw: 0_u16,
26275        chan13_raw: 0_u16,
26276        chan14_raw: 0_u16,
26277        chan15_raw: 0_u16,
26278        chan16_raw: 0_u16,
26279        chan17_raw: 0_u16,
26280        chan18_raw: 0_u16,
26281        chancount: 0_u8,
26282        rssi: 0_u8,
26283    };
26284    #[cfg(feature = "arbitrary")]
26285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26286        use arbitrary::{Arbitrary, Unstructured};
26287        let mut buf = [0u8; 1024];
26288        rng.fill_bytes(&mut buf);
26289        let mut unstructured = Unstructured::new(&buf);
26290        Self::arbitrary(&mut unstructured).unwrap_or_default()
26291    }
26292}
26293impl Default for RC_CHANNELS_DATA {
26294    fn default() -> Self {
26295        Self::DEFAULT.clone()
26296    }
26297}
26298impl MessageData for RC_CHANNELS_DATA {
26299    type Message = MavMessage;
26300    const ID: u32 = 65u32;
26301    const NAME: &'static str = "RC_CHANNELS";
26302    const EXTRA_CRC: u8 = 118u8;
26303    const ENCODED_LEN: usize = 42usize;
26304    fn deser(
26305        _version: MavlinkVersion,
26306        __input: &[u8],
26307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26308        let avail_len = __input.len();
26309        let mut payload_buf = [0; Self::ENCODED_LEN];
26310        let mut buf = if avail_len < Self::ENCODED_LEN {
26311            payload_buf[0..avail_len].copy_from_slice(__input);
26312            Bytes::new(&payload_buf)
26313        } else {
26314            Bytes::new(__input)
26315        };
26316        let mut __struct = Self::default();
26317        __struct.time_boot_ms = buf.get_u32_le();
26318        __struct.chan1_raw = buf.get_u16_le();
26319        __struct.chan2_raw = buf.get_u16_le();
26320        __struct.chan3_raw = buf.get_u16_le();
26321        __struct.chan4_raw = buf.get_u16_le();
26322        __struct.chan5_raw = buf.get_u16_le();
26323        __struct.chan6_raw = buf.get_u16_le();
26324        __struct.chan7_raw = buf.get_u16_le();
26325        __struct.chan8_raw = buf.get_u16_le();
26326        __struct.chan9_raw = buf.get_u16_le();
26327        __struct.chan10_raw = buf.get_u16_le();
26328        __struct.chan11_raw = buf.get_u16_le();
26329        __struct.chan12_raw = buf.get_u16_le();
26330        __struct.chan13_raw = buf.get_u16_le();
26331        __struct.chan14_raw = buf.get_u16_le();
26332        __struct.chan15_raw = buf.get_u16_le();
26333        __struct.chan16_raw = buf.get_u16_le();
26334        __struct.chan17_raw = buf.get_u16_le();
26335        __struct.chan18_raw = buf.get_u16_le();
26336        __struct.chancount = buf.get_u8();
26337        __struct.rssi = buf.get_u8();
26338        Ok(__struct)
26339    }
26340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26341        let mut __tmp = BytesMut::new(bytes);
26342        #[allow(clippy::absurd_extreme_comparisons)]
26343        #[allow(unused_comparisons)]
26344        if __tmp.remaining() < Self::ENCODED_LEN {
26345            panic!(
26346                "buffer is too small (need {} bytes, but got {})",
26347                Self::ENCODED_LEN,
26348                __tmp.remaining(),
26349            )
26350        }
26351        __tmp.put_u32_le(self.time_boot_ms);
26352        __tmp.put_u16_le(self.chan1_raw);
26353        __tmp.put_u16_le(self.chan2_raw);
26354        __tmp.put_u16_le(self.chan3_raw);
26355        __tmp.put_u16_le(self.chan4_raw);
26356        __tmp.put_u16_le(self.chan5_raw);
26357        __tmp.put_u16_le(self.chan6_raw);
26358        __tmp.put_u16_le(self.chan7_raw);
26359        __tmp.put_u16_le(self.chan8_raw);
26360        __tmp.put_u16_le(self.chan9_raw);
26361        __tmp.put_u16_le(self.chan10_raw);
26362        __tmp.put_u16_le(self.chan11_raw);
26363        __tmp.put_u16_le(self.chan12_raw);
26364        __tmp.put_u16_le(self.chan13_raw);
26365        __tmp.put_u16_le(self.chan14_raw);
26366        __tmp.put_u16_le(self.chan15_raw);
26367        __tmp.put_u16_le(self.chan16_raw);
26368        __tmp.put_u16_le(self.chan17_raw);
26369        __tmp.put_u16_le(self.chan18_raw);
26370        __tmp.put_u8(self.chancount);
26371        __tmp.put_u8(self.rssi);
26372        if matches!(version, MavlinkVersion::V2) {
26373            let len = __tmp.len();
26374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26375        } else {
26376            __tmp.len()
26377        }
26378    }
26379}
26380#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26381#[doc = ""]
26382#[doc = "ID: 70"]
26383#[derive(Debug, Clone, PartialEq)]
26384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26386#[cfg_attr(feature = "ts", derive(TS))]
26387#[cfg_attr(feature = "ts", ts(export))]
26388pub struct RC_CHANNELS_OVERRIDE_DATA {
26389    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26390    pub chan1_raw: u16,
26391    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26392    pub chan2_raw: u16,
26393    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26394    pub chan3_raw: u16,
26395    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26396    pub chan4_raw: u16,
26397    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26398    pub chan5_raw: u16,
26399    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26400    pub chan6_raw: u16,
26401    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26402    pub chan7_raw: u16,
26403    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26404    pub chan8_raw: u16,
26405    #[doc = "System ID"]
26406    pub target_system: u8,
26407    #[doc = "Component ID"]
26408    pub target_component: u8,
26409    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26410    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26411    pub chan9_raw: u16,
26412    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26413    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26414    pub chan10_raw: u16,
26415    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26416    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26417    pub chan11_raw: u16,
26418    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26420    pub chan12_raw: u16,
26421    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26422    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26423    pub chan13_raw: u16,
26424    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26425    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26426    pub chan14_raw: u16,
26427    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26428    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26429    pub chan15_raw: u16,
26430    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26432    pub chan16_raw: u16,
26433    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26435    pub chan17_raw: u16,
26436    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26437    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26438    pub chan18_raw: u16,
26439}
26440impl RC_CHANNELS_OVERRIDE_DATA {
26441    pub const ENCODED_LEN: usize = 38usize;
26442    pub const DEFAULT: Self = Self {
26443        chan1_raw: 0_u16,
26444        chan2_raw: 0_u16,
26445        chan3_raw: 0_u16,
26446        chan4_raw: 0_u16,
26447        chan5_raw: 0_u16,
26448        chan6_raw: 0_u16,
26449        chan7_raw: 0_u16,
26450        chan8_raw: 0_u16,
26451        target_system: 0_u8,
26452        target_component: 0_u8,
26453        chan9_raw: 0_u16,
26454        chan10_raw: 0_u16,
26455        chan11_raw: 0_u16,
26456        chan12_raw: 0_u16,
26457        chan13_raw: 0_u16,
26458        chan14_raw: 0_u16,
26459        chan15_raw: 0_u16,
26460        chan16_raw: 0_u16,
26461        chan17_raw: 0_u16,
26462        chan18_raw: 0_u16,
26463    };
26464    #[cfg(feature = "arbitrary")]
26465    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26466        use arbitrary::{Arbitrary, Unstructured};
26467        let mut buf = [0u8; 1024];
26468        rng.fill_bytes(&mut buf);
26469        let mut unstructured = Unstructured::new(&buf);
26470        Self::arbitrary(&mut unstructured).unwrap_or_default()
26471    }
26472}
26473impl Default for RC_CHANNELS_OVERRIDE_DATA {
26474    fn default() -> Self {
26475        Self::DEFAULT.clone()
26476    }
26477}
26478impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26479    type Message = MavMessage;
26480    const ID: u32 = 70u32;
26481    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26482    const EXTRA_CRC: u8 = 124u8;
26483    const ENCODED_LEN: usize = 38usize;
26484    fn deser(
26485        _version: MavlinkVersion,
26486        __input: &[u8],
26487    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26488        let avail_len = __input.len();
26489        let mut payload_buf = [0; Self::ENCODED_LEN];
26490        let mut buf = if avail_len < Self::ENCODED_LEN {
26491            payload_buf[0..avail_len].copy_from_slice(__input);
26492            Bytes::new(&payload_buf)
26493        } else {
26494            Bytes::new(__input)
26495        };
26496        let mut __struct = Self::default();
26497        __struct.chan1_raw = buf.get_u16_le();
26498        __struct.chan2_raw = buf.get_u16_le();
26499        __struct.chan3_raw = buf.get_u16_le();
26500        __struct.chan4_raw = buf.get_u16_le();
26501        __struct.chan5_raw = buf.get_u16_le();
26502        __struct.chan6_raw = buf.get_u16_le();
26503        __struct.chan7_raw = buf.get_u16_le();
26504        __struct.chan8_raw = buf.get_u16_le();
26505        __struct.target_system = buf.get_u8();
26506        __struct.target_component = buf.get_u8();
26507        __struct.chan9_raw = buf.get_u16_le();
26508        __struct.chan10_raw = buf.get_u16_le();
26509        __struct.chan11_raw = buf.get_u16_le();
26510        __struct.chan12_raw = buf.get_u16_le();
26511        __struct.chan13_raw = buf.get_u16_le();
26512        __struct.chan14_raw = buf.get_u16_le();
26513        __struct.chan15_raw = buf.get_u16_le();
26514        __struct.chan16_raw = buf.get_u16_le();
26515        __struct.chan17_raw = buf.get_u16_le();
26516        __struct.chan18_raw = buf.get_u16_le();
26517        Ok(__struct)
26518    }
26519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26520        let mut __tmp = BytesMut::new(bytes);
26521        #[allow(clippy::absurd_extreme_comparisons)]
26522        #[allow(unused_comparisons)]
26523        if __tmp.remaining() < Self::ENCODED_LEN {
26524            panic!(
26525                "buffer is too small (need {} bytes, but got {})",
26526                Self::ENCODED_LEN,
26527                __tmp.remaining(),
26528            )
26529        }
26530        __tmp.put_u16_le(self.chan1_raw);
26531        __tmp.put_u16_le(self.chan2_raw);
26532        __tmp.put_u16_le(self.chan3_raw);
26533        __tmp.put_u16_le(self.chan4_raw);
26534        __tmp.put_u16_le(self.chan5_raw);
26535        __tmp.put_u16_le(self.chan6_raw);
26536        __tmp.put_u16_le(self.chan7_raw);
26537        __tmp.put_u16_le(self.chan8_raw);
26538        __tmp.put_u8(self.target_system);
26539        __tmp.put_u8(self.target_component);
26540        if matches!(version, MavlinkVersion::V2) {
26541            __tmp.put_u16_le(self.chan9_raw);
26542            __tmp.put_u16_le(self.chan10_raw);
26543            __tmp.put_u16_le(self.chan11_raw);
26544            __tmp.put_u16_le(self.chan12_raw);
26545            __tmp.put_u16_le(self.chan13_raw);
26546            __tmp.put_u16_le(self.chan14_raw);
26547            __tmp.put_u16_le(self.chan15_raw);
26548            __tmp.put_u16_le(self.chan16_raw);
26549            __tmp.put_u16_le(self.chan17_raw);
26550            __tmp.put_u16_le(self.chan18_raw);
26551            let len = __tmp.len();
26552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26553        } else {
26554            __tmp.len()
26555        }
26556    }
26557}
26558#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26559#[doc = ""]
26560#[doc = "ID: 35"]
26561#[derive(Debug, Clone, PartialEq)]
26562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26564#[cfg_attr(feature = "ts", derive(TS))]
26565#[cfg_attr(feature = "ts", ts(export))]
26566pub struct RC_CHANNELS_RAW_DATA {
26567    #[doc = "Timestamp (time since system boot)."]
26568    pub time_boot_ms: u32,
26569    #[doc = "RC channel 1 value."]
26570    pub chan1_raw: u16,
26571    #[doc = "RC channel 2 value."]
26572    pub chan2_raw: u16,
26573    #[doc = "RC channel 3 value."]
26574    pub chan3_raw: u16,
26575    #[doc = "RC channel 4 value."]
26576    pub chan4_raw: u16,
26577    #[doc = "RC channel 5 value."]
26578    pub chan5_raw: u16,
26579    #[doc = "RC channel 6 value."]
26580    pub chan6_raw: u16,
26581    #[doc = "RC channel 7 value."]
26582    pub chan7_raw: u16,
26583    #[doc = "RC channel 8 value."]
26584    pub chan8_raw: u16,
26585    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26586    pub port: u8,
26587    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26588    pub rssi: u8,
26589}
26590impl RC_CHANNELS_RAW_DATA {
26591    pub const ENCODED_LEN: usize = 22usize;
26592    pub const DEFAULT: Self = Self {
26593        time_boot_ms: 0_u32,
26594        chan1_raw: 0_u16,
26595        chan2_raw: 0_u16,
26596        chan3_raw: 0_u16,
26597        chan4_raw: 0_u16,
26598        chan5_raw: 0_u16,
26599        chan6_raw: 0_u16,
26600        chan7_raw: 0_u16,
26601        chan8_raw: 0_u16,
26602        port: 0_u8,
26603        rssi: 0_u8,
26604    };
26605    #[cfg(feature = "arbitrary")]
26606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26607        use arbitrary::{Arbitrary, Unstructured};
26608        let mut buf = [0u8; 1024];
26609        rng.fill_bytes(&mut buf);
26610        let mut unstructured = Unstructured::new(&buf);
26611        Self::arbitrary(&mut unstructured).unwrap_or_default()
26612    }
26613}
26614impl Default for RC_CHANNELS_RAW_DATA {
26615    fn default() -> Self {
26616        Self::DEFAULT.clone()
26617    }
26618}
26619impl MessageData for RC_CHANNELS_RAW_DATA {
26620    type Message = MavMessage;
26621    const ID: u32 = 35u32;
26622    const NAME: &'static str = "RC_CHANNELS_RAW";
26623    const EXTRA_CRC: u8 = 244u8;
26624    const ENCODED_LEN: usize = 22usize;
26625    fn deser(
26626        _version: MavlinkVersion,
26627        __input: &[u8],
26628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26629        let avail_len = __input.len();
26630        let mut payload_buf = [0; Self::ENCODED_LEN];
26631        let mut buf = if avail_len < Self::ENCODED_LEN {
26632            payload_buf[0..avail_len].copy_from_slice(__input);
26633            Bytes::new(&payload_buf)
26634        } else {
26635            Bytes::new(__input)
26636        };
26637        let mut __struct = Self::default();
26638        __struct.time_boot_ms = buf.get_u32_le();
26639        __struct.chan1_raw = buf.get_u16_le();
26640        __struct.chan2_raw = buf.get_u16_le();
26641        __struct.chan3_raw = buf.get_u16_le();
26642        __struct.chan4_raw = buf.get_u16_le();
26643        __struct.chan5_raw = buf.get_u16_le();
26644        __struct.chan6_raw = buf.get_u16_le();
26645        __struct.chan7_raw = buf.get_u16_le();
26646        __struct.chan8_raw = buf.get_u16_le();
26647        __struct.port = buf.get_u8();
26648        __struct.rssi = buf.get_u8();
26649        Ok(__struct)
26650    }
26651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26652        let mut __tmp = BytesMut::new(bytes);
26653        #[allow(clippy::absurd_extreme_comparisons)]
26654        #[allow(unused_comparisons)]
26655        if __tmp.remaining() < Self::ENCODED_LEN {
26656            panic!(
26657                "buffer is too small (need {} bytes, but got {})",
26658                Self::ENCODED_LEN,
26659                __tmp.remaining(),
26660            )
26661        }
26662        __tmp.put_u32_le(self.time_boot_ms);
26663        __tmp.put_u16_le(self.chan1_raw);
26664        __tmp.put_u16_le(self.chan2_raw);
26665        __tmp.put_u16_le(self.chan3_raw);
26666        __tmp.put_u16_le(self.chan4_raw);
26667        __tmp.put_u16_le(self.chan5_raw);
26668        __tmp.put_u16_le(self.chan6_raw);
26669        __tmp.put_u16_le(self.chan7_raw);
26670        __tmp.put_u16_le(self.chan8_raw);
26671        __tmp.put_u8(self.port);
26672        __tmp.put_u8(self.rssi);
26673        if matches!(version, MavlinkVersion::V2) {
26674            let len = __tmp.len();
26675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26676        } else {
26677            __tmp.len()
26678        }
26679    }
26680}
26681#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26682#[doc = ""]
26683#[doc = "ID: 34"]
26684#[derive(Debug, Clone, PartialEq)]
26685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26686#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26687#[cfg_attr(feature = "ts", derive(TS))]
26688#[cfg_attr(feature = "ts", ts(export))]
26689pub struct RC_CHANNELS_SCALED_DATA {
26690    #[doc = "Timestamp (time since system boot)."]
26691    pub time_boot_ms: u32,
26692    #[doc = "RC channel 1 value scaled."]
26693    pub chan1_scaled: i16,
26694    #[doc = "RC channel 2 value scaled."]
26695    pub chan2_scaled: i16,
26696    #[doc = "RC channel 3 value scaled."]
26697    pub chan3_scaled: i16,
26698    #[doc = "RC channel 4 value scaled."]
26699    pub chan4_scaled: i16,
26700    #[doc = "RC channel 5 value scaled."]
26701    pub chan5_scaled: i16,
26702    #[doc = "RC channel 6 value scaled."]
26703    pub chan6_scaled: i16,
26704    #[doc = "RC channel 7 value scaled."]
26705    pub chan7_scaled: i16,
26706    #[doc = "RC channel 8 value scaled."]
26707    pub chan8_scaled: i16,
26708    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26709    pub port: u8,
26710    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26711    pub rssi: u8,
26712}
26713impl RC_CHANNELS_SCALED_DATA {
26714    pub const ENCODED_LEN: usize = 22usize;
26715    pub const DEFAULT: Self = Self {
26716        time_boot_ms: 0_u32,
26717        chan1_scaled: 0_i16,
26718        chan2_scaled: 0_i16,
26719        chan3_scaled: 0_i16,
26720        chan4_scaled: 0_i16,
26721        chan5_scaled: 0_i16,
26722        chan6_scaled: 0_i16,
26723        chan7_scaled: 0_i16,
26724        chan8_scaled: 0_i16,
26725        port: 0_u8,
26726        rssi: 0_u8,
26727    };
26728    #[cfg(feature = "arbitrary")]
26729    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26730        use arbitrary::{Arbitrary, Unstructured};
26731        let mut buf = [0u8; 1024];
26732        rng.fill_bytes(&mut buf);
26733        let mut unstructured = Unstructured::new(&buf);
26734        Self::arbitrary(&mut unstructured).unwrap_or_default()
26735    }
26736}
26737impl Default for RC_CHANNELS_SCALED_DATA {
26738    fn default() -> Self {
26739        Self::DEFAULT.clone()
26740    }
26741}
26742impl MessageData for RC_CHANNELS_SCALED_DATA {
26743    type Message = MavMessage;
26744    const ID: u32 = 34u32;
26745    const NAME: &'static str = "RC_CHANNELS_SCALED";
26746    const EXTRA_CRC: u8 = 237u8;
26747    const ENCODED_LEN: usize = 22usize;
26748    fn deser(
26749        _version: MavlinkVersion,
26750        __input: &[u8],
26751    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26752        let avail_len = __input.len();
26753        let mut payload_buf = [0; Self::ENCODED_LEN];
26754        let mut buf = if avail_len < Self::ENCODED_LEN {
26755            payload_buf[0..avail_len].copy_from_slice(__input);
26756            Bytes::new(&payload_buf)
26757        } else {
26758            Bytes::new(__input)
26759        };
26760        let mut __struct = Self::default();
26761        __struct.time_boot_ms = buf.get_u32_le();
26762        __struct.chan1_scaled = buf.get_i16_le();
26763        __struct.chan2_scaled = buf.get_i16_le();
26764        __struct.chan3_scaled = buf.get_i16_le();
26765        __struct.chan4_scaled = buf.get_i16_le();
26766        __struct.chan5_scaled = buf.get_i16_le();
26767        __struct.chan6_scaled = buf.get_i16_le();
26768        __struct.chan7_scaled = buf.get_i16_le();
26769        __struct.chan8_scaled = buf.get_i16_le();
26770        __struct.port = buf.get_u8();
26771        __struct.rssi = buf.get_u8();
26772        Ok(__struct)
26773    }
26774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26775        let mut __tmp = BytesMut::new(bytes);
26776        #[allow(clippy::absurd_extreme_comparisons)]
26777        #[allow(unused_comparisons)]
26778        if __tmp.remaining() < Self::ENCODED_LEN {
26779            panic!(
26780                "buffer is too small (need {} bytes, but got {})",
26781                Self::ENCODED_LEN,
26782                __tmp.remaining(),
26783            )
26784        }
26785        __tmp.put_u32_le(self.time_boot_ms);
26786        __tmp.put_i16_le(self.chan1_scaled);
26787        __tmp.put_i16_le(self.chan2_scaled);
26788        __tmp.put_i16_le(self.chan3_scaled);
26789        __tmp.put_i16_le(self.chan4_scaled);
26790        __tmp.put_i16_le(self.chan5_scaled);
26791        __tmp.put_i16_le(self.chan6_scaled);
26792        __tmp.put_i16_le(self.chan7_scaled);
26793        __tmp.put_i16_le(self.chan8_scaled);
26794        __tmp.put_u8(self.port);
26795        __tmp.put_u8(self.rssi);
26796        if matches!(version, MavlinkVersion::V2) {
26797            let len = __tmp.len();
26798            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26799        } else {
26800            __tmp.len()
26801        }
26802    }
26803}
26804#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26805#[doc = "Request a data stream."]
26806#[doc = ""]
26807#[doc = "ID: 66"]
26808#[derive(Debug, Clone, PartialEq)]
26809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26811#[cfg_attr(feature = "ts", derive(TS))]
26812#[cfg_attr(feature = "ts", ts(export))]
26813pub struct REQUEST_DATA_STREAM_DATA {
26814    #[doc = "The requested message rate"]
26815    pub req_message_rate: u16,
26816    #[doc = "The target requested to send the message stream."]
26817    pub target_system: u8,
26818    #[doc = "The target requested to send the message stream."]
26819    pub target_component: u8,
26820    #[doc = "The ID of the requested data stream"]
26821    pub req_stream_id: u8,
26822    #[doc = "1 to start sending, 0 to stop sending."]
26823    pub start_stop: u8,
26824}
26825impl REQUEST_DATA_STREAM_DATA {
26826    pub const ENCODED_LEN: usize = 6usize;
26827    pub const DEFAULT: Self = Self {
26828        req_message_rate: 0_u16,
26829        target_system: 0_u8,
26830        target_component: 0_u8,
26831        req_stream_id: 0_u8,
26832        start_stop: 0_u8,
26833    };
26834    #[cfg(feature = "arbitrary")]
26835    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26836        use arbitrary::{Arbitrary, Unstructured};
26837        let mut buf = [0u8; 1024];
26838        rng.fill_bytes(&mut buf);
26839        let mut unstructured = Unstructured::new(&buf);
26840        Self::arbitrary(&mut unstructured).unwrap_or_default()
26841    }
26842}
26843impl Default for REQUEST_DATA_STREAM_DATA {
26844    fn default() -> Self {
26845        Self::DEFAULT.clone()
26846    }
26847}
26848impl MessageData for REQUEST_DATA_STREAM_DATA {
26849    type Message = MavMessage;
26850    const ID: u32 = 66u32;
26851    const NAME: &'static str = "REQUEST_DATA_STREAM";
26852    const EXTRA_CRC: u8 = 148u8;
26853    const ENCODED_LEN: usize = 6usize;
26854    fn deser(
26855        _version: MavlinkVersion,
26856        __input: &[u8],
26857    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26858        let avail_len = __input.len();
26859        let mut payload_buf = [0; Self::ENCODED_LEN];
26860        let mut buf = if avail_len < Self::ENCODED_LEN {
26861            payload_buf[0..avail_len].copy_from_slice(__input);
26862            Bytes::new(&payload_buf)
26863        } else {
26864            Bytes::new(__input)
26865        };
26866        let mut __struct = Self::default();
26867        __struct.req_message_rate = buf.get_u16_le();
26868        __struct.target_system = buf.get_u8();
26869        __struct.target_component = buf.get_u8();
26870        __struct.req_stream_id = buf.get_u8();
26871        __struct.start_stop = buf.get_u8();
26872        Ok(__struct)
26873    }
26874    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26875        let mut __tmp = BytesMut::new(bytes);
26876        #[allow(clippy::absurd_extreme_comparisons)]
26877        #[allow(unused_comparisons)]
26878        if __tmp.remaining() < Self::ENCODED_LEN {
26879            panic!(
26880                "buffer is too small (need {} bytes, but got {})",
26881                Self::ENCODED_LEN,
26882                __tmp.remaining(),
26883            )
26884        }
26885        __tmp.put_u16_le(self.req_message_rate);
26886        __tmp.put_u8(self.target_system);
26887        __tmp.put_u8(self.target_component);
26888        __tmp.put_u8(self.req_stream_id);
26889        __tmp.put_u8(self.start_stop);
26890        if matches!(version, MavlinkVersion::V2) {
26891            let len = __tmp.len();
26892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26893        } else {
26894            __tmp.len()
26895        }
26896    }
26897}
26898#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26899#[doc = ""]
26900#[doc = "ID: 412"]
26901#[derive(Debug, Clone, PartialEq)]
26902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26904#[cfg_attr(feature = "ts", derive(TS))]
26905#[cfg_attr(feature = "ts", ts(export))]
26906pub struct REQUEST_EVENT_DATA {
26907    #[doc = "First sequence number of the requested event."]
26908    pub first_sequence: u16,
26909    #[doc = "Last sequence number of the requested event."]
26910    pub last_sequence: u16,
26911    #[doc = "System ID"]
26912    pub target_system: u8,
26913    #[doc = "Component ID"]
26914    pub target_component: u8,
26915}
26916impl REQUEST_EVENT_DATA {
26917    pub const ENCODED_LEN: usize = 6usize;
26918    pub const DEFAULT: Self = Self {
26919        first_sequence: 0_u16,
26920        last_sequence: 0_u16,
26921        target_system: 0_u8,
26922        target_component: 0_u8,
26923    };
26924    #[cfg(feature = "arbitrary")]
26925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26926        use arbitrary::{Arbitrary, Unstructured};
26927        let mut buf = [0u8; 1024];
26928        rng.fill_bytes(&mut buf);
26929        let mut unstructured = Unstructured::new(&buf);
26930        Self::arbitrary(&mut unstructured).unwrap_or_default()
26931    }
26932}
26933impl Default for REQUEST_EVENT_DATA {
26934    fn default() -> Self {
26935        Self::DEFAULT.clone()
26936    }
26937}
26938impl MessageData for REQUEST_EVENT_DATA {
26939    type Message = MavMessage;
26940    const ID: u32 = 412u32;
26941    const NAME: &'static str = "REQUEST_EVENT";
26942    const EXTRA_CRC: u8 = 33u8;
26943    const ENCODED_LEN: usize = 6usize;
26944    fn deser(
26945        _version: MavlinkVersion,
26946        __input: &[u8],
26947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26948        let avail_len = __input.len();
26949        let mut payload_buf = [0; Self::ENCODED_LEN];
26950        let mut buf = if avail_len < Self::ENCODED_LEN {
26951            payload_buf[0..avail_len].copy_from_slice(__input);
26952            Bytes::new(&payload_buf)
26953        } else {
26954            Bytes::new(__input)
26955        };
26956        let mut __struct = Self::default();
26957        __struct.first_sequence = buf.get_u16_le();
26958        __struct.last_sequence = buf.get_u16_le();
26959        __struct.target_system = buf.get_u8();
26960        __struct.target_component = buf.get_u8();
26961        Ok(__struct)
26962    }
26963    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26964        let mut __tmp = BytesMut::new(bytes);
26965        #[allow(clippy::absurd_extreme_comparisons)]
26966        #[allow(unused_comparisons)]
26967        if __tmp.remaining() < Self::ENCODED_LEN {
26968            panic!(
26969                "buffer is too small (need {} bytes, but got {})",
26970                Self::ENCODED_LEN,
26971                __tmp.remaining(),
26972            )
26973        }
26974        __tmp.put_u16_le(self.first_sequence);
26975        __tmp.put_u16_le(self.last_sequence);
26976        __tmp.put_u8(self.target_system);
26977        __tmp.put_u8(self.target_component);
26978        if matches!(version, MavlinkVersion::V2) {
26979            let len = __tmp.len();
26980            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26981        } else {
26982            __tmp.len()
26983        }
26984    }
26985}
26986#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26987#[doc = ""]
26988#[doc = "ID: 142"]
26989#[derive(Debug, Clone, PartialEq)]
26990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26992#[cfg_attr(feature = "ts", derive(TS))]
26993#[cfg_attr(feature = "ts", ts(export))]
26994pub struct RESOURCE_REQUEST_DATA {
26995    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26996    pub request_id: u8,
26997    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26998    pub uri_type: u8,
26999    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
27000    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27001    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27002    pub uri: [u8; 120],
27003    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
27004    pub transfer_type: u8,
27005    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
27006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27008    pub storage: [u8; 120],
27009}
27010impl RESOURCE_REQUEST_DATA {
27011    pub const ENCODED_LEN: usize = 243usize;
27012    pub const DEFAULT: Self = Self {
27013        request_id: 0_u8,
27014        uri_type: 0_u8,
27015        uri: [0_u8; 120usize],
27016        transfer_type: 0_u8,
27017        storage: [0_u8; 120usize],
27018    };
27019    #[cfg(feature = "arbitrary")]
27020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27021        use arbitrary::{Arbitrary, Unstructured};
27022        let mut buf = [0u8; 1024];
27023        rng.fill_bytes(&mut buf);
27024        let mut unstructured = Unstructured::new(&buf);
27025        Self::arbitrary(&mut unstructured).unwrap_or_default()
27026    }
27027}
27028impl Default for RESOURCE_REQUEST_DATA {
27029    fn default() -> Self {
27030        Self::DEFAULT.clone()
27031    }
27032}
27033impl MessageData for RESOURCE_REQUEST_DATA {
27034    type Message = MavMessage;
27035    const ID: u32 = 142u32;
27036    const NAME: &'static str = "RESOURCE_REQUEST";
27037    const EXTRA_CRC: u8 = 72u8;
27038    const ENCODED_LEN: usize = 243usize;
27039    fn deser(
27040        _version: MavlinkVersion,
27041        __input: &[u8],
27042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27043        let avail_len = __input.len();
27044        let mut payload_buf = [0; Self::ENCODED_LEN];
27045        let mut buf = if avail_len < Self::ENCODED_LEN {
27046            payload_buf[0..avail_len].copy_from_slice(__input);
27047            Bytes::new(&payload_buf)
27048        } else {
27049            Bytes::new(__input)
27050        };
27051        let mut __struct = Self::default();
27052        __struct.request_id = buf.get_u8();
27053        __struct.uri_type = buf.get_u8();
27054        for v in &mut __struct.uri {
27055            let val = buf.get_u8();
27056            *v = val;
27057        }
27058        __struct.transfer_type = buf.get_u8();
27059        for v in &mut __struct.storage {
27060            let val = buf.get_u8();
27061            *v = val;
27062        }
27063        Ok(__struct)
27064    }
27065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27066        let mut __tmp = BytesMut::new(bytes);
27067        #[allow(clippy::absurd_extreme_comparisons)]
27068        #[allow(unused_comparisons)]
27069        if __tmp.remaining() < Self::ENCODED_LEN {
27070            panic!(
27071                "buffer is too small (need {} bytes, but got {})",
27072                Self::ENCODED_LEN,
27073                __tmp.remaining(),
27074            )
27075        }
27076        __tmp.put_u8(self.request_id);
27077        __tmp.put_u8(self.uri_type);
27078        for val in &self.uri {
27079            __tmp.put_u8(*val);
27080        }
27081        __tmp.put_u8(self.transfer_type);
27082        for val in &self.storage {
27083            __tmp.put_u8(*val);
27084        }
27085        if matches!(version, MavlinkVersion::V2) {
27086            let len = __tmp.len();
27087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27088        } else {
27089            __tmp.len()
27090        }
27091    }
27092}
27093#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27094#[doc = ""]
27095#[doc = "ID: 413"]
27096#[derive(Debug, Clone, PartialEq)]
27097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27099#[cfg_attr(feature = "ts", derive(TS))]
27100#[cfg_attr(feature = "ts", ts(export))]
27101pub struct RESPONSE_EVENT_ERROR_DATA {
27102    #[doc = "Sequence number."]
27103    pub sequence: u16,
27104    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27105    pub sequence_oldest_available: u16,
27106    #[doc = "System ID"]
27107    pub target_system: u8,
27108    #[doc = "Component ID"]
27109    pub target_component: u8,
27110    #[doc = "Error reason."]
27111    pub reason: MavEventErrorReason,
27112}
27113impl RESPONSE_EVENT_ERROR_DATA {
27114    pub const ENCODED_LEN: usize = 7usize;
27115    pub const DEFAULT: Self = Self {
27116        sequence: 0_u16,
27117        sequence_oldest_available: 0_u16,
27118        target_system: 0_u8,
27119        target_component: 0_u8,
27120        reason: MavEventErrorReason::DEFAULT,
27121    };
27122    #[cfg(feature = "arbitrary")]
27123    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27124        use arbitrary::{Arbitrary, Unstructured};
27125        let mut buf = [0u8; 1024];
27126        rng.fill_bytes(&mut buf);
27127        let mut unstructured = Unstructured::new(&buf);
27128        Self::arbitrary(&mut unstructured).unwrap_or_default()
27129    }
27130}
27131impl Default for RESPONSE_EVENT_ERROR_DATA {
27132    fn default() -> Self {
27133        Self::DEFAULT.clone()
27134    }
27135}
27136impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27137    type Message = MavMessage;
27138    const ID: u32 = 413u32;
27139    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27140    const EXTRA_CRC: u8 = 77u8;
27141    const ENCODED_LEN: usize = 7usize;
27142    fn deser(
27143        _version: MavlinkVersion,
27144        __input: &[u8],
27145    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27146        let avail_len = __input.len();
27147        let mut payload_buf = [0; Self::ENCODED_LEN];
27148        let mut buf = if avail_len < Self::ENCODED_LEN {
27149            payload_buf[0..avail_len].copy_from_slice(__input);
27150            Bytes::new(&payload_buf)
27151        } else {
27152            Bytes::new(__input)
27153        };
27154        let mut __struct = Self::default();
27155        __struct.sequence = buf.get_u16_le();
27156        __struct.sequence_oldest_available = buf.get_u16_le();
27157        __struct.target_system = buf.get_u8();
27158        __struct.target_component = buf.get_u8();
27159        let tmp = buf.get_u8();
27160        __struct.reason =
27161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27162                enum_type: "MavEventErrorReason",
27163                value: tmp as u32,
27164            })?;
27165        Ok(__struct)
27166    }
27167    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27168        let mut __tmp = BytesMut::new(bytes);
27169        #[allow(clippy::absurd_extreme_comparisons)]
27170        #[allow(unused_comparisons)]
27171        if __tmp.remaining() < Self::ENCODED_LEN {
27172            panic!(
27173                "buffer is too small (need {} bytes, but got {})",
27174                Self::ENCODED_LEN,
27175                __tmp.remaining(),
27176            )
27177        }
27178        __tmp.put_u16_le(self.sequence);
27179        __tmp.put_u16_le(self.sequence_oldest_available);
27180        __tmp.put_u8(self.target_system);
27181        __tmp.put_u8(self.target_component);
27182        __tmp.put_u8(self.reason as u8);
27183        if matches!(version, MavlinkVersion::V2) {
27184            let len = __tmp.len();
27185            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27186        } else {
27187            __tmp.len()
27188        }
27189    }
27190}
27191#[doc = "Read out the safety zone the MAV currently assumes."]
27192#[doc = ""]
27193#[doc = "ID: 55"]
27194#[derive(Debug, Clone, PartialEq)]
27195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27197#[cfg_attr(feature = "ts", derive(TS))]
27198#[cfg_attr(feature = "ts", ts(export))]
27199pub struct SAFETY_ALLOWED_AREA_DATA {
27200    #[doc = "x position 1 / Latitude 1"]
27201    pub p1x: f32,
27202    #[doc = "y position 1 / Longitude 1"]
27203    pub p1y: f32,
27204    #[doc = "z position 1 / Altitude 1"]
27205    pub p1z: f32,
27206    #[doc = "x position 2 / Latitude 2"]
27207    pub p2x: f32,
27208    #[doc = "y position 2 / Longitude 2"]
27209    pub p2y: f32,
27210    #[doc = "z position 2 / Altitude 2"]
27211    pub p2z: f32,
27212    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27213    pub frame: MavFrame,
27214}
27215impl SAFETY_ALLOWED_AREA_DATA {
27216    pub const ENCODED_LEN: usize = 25usize;
27217    pub const DEFAULT: Self = Self {
27218        p1x: 0.0_f32,
27219        p1y: 0.0_f32,
27220        p1z: 0.0_f32,
27221        p2x: 0.0_f32,
27222        p2y: 0.0_f32,
27223        p2z: 0.0_f32,
27224        frame: MavFrame::DEFAULT,
27225    };
27226    #[cfg(feature = "arbitrary")]
27227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27228        use arbitrary::{Arbitrary, Unstructured};
27229        let mut buf = [0u8; 1024];
27230        rng.fill_bytes(&mut buf);
27231        let mut unstructured = Unstructured::new(&buf);
27232        Self::arbitrary(&mut unstructured).unwrap_or_default()
27233    }
27234}
27235impl Default for SAFETY_ALLOWED_AREA_DATA {
27236    fn default() -> Self {
27237        Self::DEFAULT.clone()
27238    }
27239}
27240impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27241    type Message = MavMessage;
27242    const ID: u32 = 55u32;
27243    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27244    const EXTRA_CRC: u8 = 3u8;
27245    const ENCODED_LEN: usize = 25usize;
27246    fn deser(
27247        _version: MavlinkVersion,
27248        __input: &[u8],
27249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27250        let avail_len = __input.len();
27251        let mut payload_buf = [0; Self::ENCODED_LEN];
27252        let mut buf = if avail_len < Self::ENCODED_LEN {
27253            payload_buf[0..avail_len].copy_from_slice(__input);
27254            Bytes::new(&payload_buf)
27255        } else {
27256            Bytes::new(__input)
27257        };
27258        let mut __struct = Self::default();
27259        __struct.p1x = buf.get_f32_le();
27260        __struct.p1y = buf.get_f32_le();
27261        __struct.p1z = buf.get_f32_le();
27262        __struct.p2x = buf.get_f32_le();
27263        __struct.p2y = buf.get_f32_le();
27264        __struct.p2z = buf.get_f32_le();
27265        let tmp = buf.get_u8();
27266        __struct.frame =
27267            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27268                enum_type: "MavFrame",
27269                value: tmp as u32,
27270            })?;
27271        Ok(__struct)
27272    }
27273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27274        let mut __tmp = BytesMut::new(bytes);
27275        #[allow(clippy::absurd_extreme_comparisons)]
27276        #[allow(unused_comparisons)]
27277        if __tmp.remaining() < Self::ENCODED_LEN {
27278            panic!(
27279                "buffer is too small (need {} bytes, but got {})",
27280                Self::ENCODED_LEN,
27281                __tmp.remaining(),
27282            )
27283        }
27284        __tmp.put_f32_le(self.p1x);
27285        __tmp.put_f32_le(self.p1y);
27286        __tmp.put_f32_le(self.p1z);
27287        __tmp.put_f32_le(self.p2x);
27288        __tmp.put_f32_le(self.p2y);
27289        __tmp.put_f32_le(self.p2z);
27290        __tmp.put_u8(self.frame as u8);
27291        if matches!(version, MavlinkVersion::V2) {
27292            let len = __tmp.len();
27293            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27294        } else {
27295            __tmp.len()
27296        }
27297    }
27298}
27299#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27300#[doc = ""]
27301#[doc = "ID: 54"]
27302#[derive(Debug, Clone, PartialEq)]
27303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27305#[cfg_attr(feature = "ts", derive(TS))]
27306#[cfg_attr(feature = "ts", ts(export))]
27307pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27308    #[doc = "x position 1 / Latitude 1"]
27309    pub p1x: f32,
27310    #[doc = "y position 1 / Longitude 1"]
27311    pub p1y: f32,
27312    #[doc = "z position 1 / Altitude 1"]
27313    pub p1z: f32,
27314    #[doc = "x position 2 / Latitude 2"]
27315    pub p2x: f32,
27316    #[doc = "y position 2 / Longitude 2"]
27317    pub p2y: f32,
27318    #[doc = "z position 2 / Altitude 2"]
27319    pub p2z: f32,
27320    #[doc = "System ID"]
27321    pub target_system: u8,
27322    #[doc = "Component ID"]
27323    pub target_component: u8,
27324    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27325    pub frame: MavFrame,
27326}
27327impl SAFETY_SET_ALLOWED_AREA_DATA {
27328    pub const ENCODED_LEN: usize = 27usize;
27329    pub const DEFAULT: Self = Self {
27330        p1x: 0.0_f32,
27331        p1y: 0.0_f32,
27332        p1z: 0.0_f32,
27333        p2x: 0.0_f32,
27334        p2y: 0.0_f32,
27335        p2z: 0.0_f32,
27336        target_system: 0_u8,
27337        target_component: 0_u8,
27338        frame: MavFrame::DEFAULT,
27339    };
27340    #[cfg(feature = "arbitrary")]
27341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27342        use arbitrary::{Arbitrary, Unstructured};
27343        let mut buf = [0u8; 1024];
27344        rng.fill_bytes(&mut buf);
27345        let mut unstructured = Unstructured::new(&buf);
27346        Self::arbitrary(&mut unstructured).unwrap_or_default()
27347    }
27348}
27349impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27350    fn default() -> Self {
27351        Self::DEFAULT.clone()
27352    }
27353}
27354impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27355    type Message = MavMessage;
27356    const ID: u32 = 54u32;
27357    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27358    const EXTRA_CRC: u8 = 15u8;
27359    const ENCODED_LEN: usize = 27usize;
27360    fn deser(
27361        _version: MavlinkVersion,
27362        __input: &[u8],
27363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27364        let avail_len = __input.len();
27365        let mut payload_buf = [0; Self::ENCODED_LEN];
27366        let mut buf = if avail_len < Self::ENCODED_LEN {
27367            payload_buf[0..avail_len].copy_from_slice(__input);
27368            Bytes::new(&payload_buf)
27369        } else {
27370            Bytes::new(__input)
27371        };
27372        let mut __struct = Self::default();
27373        __struct.p1x = buf.get_f32_le();
27374        __struct.p1y = buf.get_f32_le();
27375        __struct.p1z = buf.get_f32_le();
27376        __struct.p2x = buf.get_f32_le();
27377        __struct.p2y = buf.get_f32_le();
27378        __struct.p2z = buf.get_f32_le();
27379        __struct.target_system = buf.get_u8();
27380        __struct.target_component = buf.get_u8();
27381        let tmp = buf.get_u8();
27382        __struct.frame =
27383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27384                enum_type: "MavFrame",
27385                value: tmp as u32,
27386            })?;
27387        Ok(__struct)
27388    }
27389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27390        let mut __tmp = BytesMut::new(bytes);
27391        #[allow(clippy::absurd_extreme_comparisons)]
27392        #[allow(unused_comparisons)]
27393        if __tmp.remaining() < Self::ENCODED_LEN {
27394            panic!(
27395                "buffer is too small (need {} bytes, but got {})",
27396                Self::ENCODED_LEN,
27397                __tmp.remaining(),
27398            )
27399        }
27400        __tmp.put_f32_le(self.p1x);
27401        __tmp.put_f32_le(self.p1y);
27402        __tmp.put_f32_le(self.p1z);
27403        __tmp.put_f32_le(self.p2x);
27404        __tmp.put_f32_le(self.p2y);
27405        __tmp.put_f32_le(self.p2z);
27406        __tmp.put_u8(self.target_system);
27407        __tmp.put_u8(self.target_component);
27408        __tmp.put_u8(self.frame as u8);
27409        if matches!(version, MavlinkVersion::V2) {
27410            let len = __tmp.len();
27411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27412        } else {
27413            __tmp.len()
27414        }
27415    }
27416}
27417#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27418#[doc = ""]
27419#[doc = "ID: 26"]
27420#[derive(Debug, Clone, PartialEq)]
27421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27423#[cfg_attr(feature = "ts", derive(TS))]
27424#[cfg_attr(feature = "ts", ts(export))]
27425pub struct SCALED_IMU_DATA {
27426    #[doc = "Timestamp (time since system boot)."]
27427    pub time_boot_ms: u32,
27428    #[doc = "X acceleration"]
27429    pub xacc: i16,
27430    #[doc = "Y acceleration"]
27431    pub yacc: i16,
27432    #[doc = "Z acceleration"]
27433    pub zacc: i16,
27434    #[doc = "Angular speed around X axis"]
27435    pub xgyro: i16,
27436    #[doc = "Angular speed around Y axis"]
27437    pub ygyro: i16,
27438    #[doc = "Angular speed around Z axis"]
27439    pub zgyro: i16,
27440    #[doc = "X Magnetic field"]
27441    pub xmag: i16,
27442    #[doc = "Y Magnetic field"]
27443    pub ymag: i16,
27444    #[doc = "Z Magnetic field"]
27445    pub zmag: i16,
27446    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27447    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27448    pub temperature: i16,
27449}
27450impl SCALED_IMU_DATA {
27451    pub const ENCODED_LEN: usize = 24usize;
27452    pub const DEFAULT: Self = Self {
27453        time_boot_ms: 0_u32,
27454        xacc: 0_i16,
27455        yacc: 0_i16,
27456        zacc: 0_i16,
27457        xgyro: 0_i16,
27458        ygyro: 0_i16,
27459        zgyro: 0_i16,
27460        xmag: 0_i16,
27461        ymag: 0_i16,
27462        zmag: 0_i16,
27463        temperature: 0_i16,
27464    };
27465    #[cfg(feature = "arbitrary")]
27466    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27467        use arbitrary::{Arbitrary, Unstructured};
27468        let mut buf = [0u8; 1024];
27469        rng.fill_bytes(&mut buf);
27470        let mut unstructured = Unstructured::new(&buf);
27471        Self::arbitrary(&mut unstructured).unwrap_or_default()
27472    }
27473}
27474impl Default for SCALED_IMU_DATA {
27475    fn default() -> Self {
27476        Self::DEFAULT.clone()
27477    }
27478}
27479impl MessageData for SCALED_IMU_DATA {
27480    type Message = MavMessage;
27481    const ID: u32 = 26u32;
27482    const NAME: &'static str = "SCALED_IMU";
27483    const EXTRA_CRC: u8 = 170u8;
27484    const ENCODED_LEN: usize = 24usize;
27485    fn deser(
27486        _version: MavlinkVersion,
27487        __input: &[u8],
27488    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27489        let avail_len = __input.len();
27490        let mut payload_buf = [0; Self::ENCODED_LEN];
27491        let mut buf = if avail_len < Self::ENCODED_LEN {
27492            payload_buf[0..avail_len].copy_from_slice(__input);
27493            Bytes::new(&payload_buf)
27494        } else {
27495            Bytes::new(__input)
27496        };
27497        let mut __struct = Self::default();
27498        __struct.time_boot_ms = buf.get_u32_le();
27499        __struct.xacc = buf.get_i16_le();
27500        __struct.yacc = buf.get_i16_le();
27501        __struct.zacc = buf.get_i16_le();
27502        __struct.xgyro = buf.get_i16_le();
27503        __struct.ygyro = buf.get_i16_le();
27504        __struct.zgyro = buf.get_i16_le();
27505        __struct.xmag = buf.get_i16_le();
27506        __struct.ymag = buf.get_i16_le();
27507        __struct.zmag = buf.get_i16_le();
27508        __struct.temperature = buf.get_i16_le();
27509        Ok(__struct)
27510    }
27511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27512        let mut __tmp = BytesMut::new(bytes);
27513        #[allow(clippy::absurd_extreme_comparisons)]
27514        #[allow(unused_comparisons)]
27515        if __tmp.remaining() < Self::ENCODED_LEN {
27516            panic!(
27517                "buffer is too small (need {} bytes, but got {})",
27518                Self::ENCODED_LEN,
27519                __tmp.remaining(),
27520            )
27521        }
27522        __tmp.put_u32_le(self.time_boot_ms);
27523        __tmp.put_i16_le(self.xacc);
27524        __tmp.put_i16_le(self.yacc);
27525        __tmp.put_i16_le(self.zacc);
27526        __tmp.put_i16_le(self.xgyro);
27527        __tmp.put_i16_le(self.ygyro);
27528        __tmp.put_i16_le(self.zgyro);
27529        __tmp.put_i16_le(self.xmag);
27530        __tmp.put_i16_le(self.ymag);
27531        __tmp.put_i16_le(self.zmag);
27532        if matches!(version, MavlinkVersion::V2) {
27533            __tmp.put_i16_le(self.temperature);
27534            let len = __tmp.len();
27535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27536        } else {
27537            __tmp.len()
27538        }
27539    }
27540}
27541#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27542#[doc = ""]
27543#[doc = "ID: 116"]
27544#[derive(Debug, Clone, PartialEq)]
27545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27547#[cfg_attr(feature = "ts", derive(TS))]
27548#[cfg_attr(feature = "ts", ts(export))]
27549pub struct SCALED_IMU2_DATA {
27550    #[doc = "Timestamp (time since system boot)."]
27551    pub time_boot_ms: u32,
27552    #[doc = "X acceleration"]
27553    pub xacc: i16,
27554    #[doc = "Y acceleration"]
27555    pub yacc: i16,
27556    #[doc = "Z acceleration"]
27557    pub zacc: i16,
27558    #[doc = "Angular speed around X axis"]
27559    pub xgyro: i16,
27560    #[doc = "Angular speed around Y axis"]
27561    pub ygyro: i16,
27562    #[doc = "Angular speed around Z axis"]
27563    pub zgyro: i16,
27564    #[doc = "X Magnetic field"]
27565    pub xmag: i16,
27566    #[doc = "Y Magnetic field"]
27567    pub ymag: i16,
27568    #[doc = "Z Magnetic field"]
27569    pub zmag: i16,
27570    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27571    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27572    pub temperature: i16,
27573}
27574impl SCALED_IMU2_DATA {
27575    pub const ENCODED_LEN: usize = 24usize;
27576    pub const DEFAULT: Self = Self {
27577        time_boot_ms: 0_u32,
27578        xacc: 0_i16,
27579        yacc: 0_i16,
27580        zacc: 0_i16,
27581        xgyro: 0_i16,
27582        ygyro: 0_i16,
27583        zgyro: 0_i16,
27584        xmag: 0_i16,
27585        ymag: 0_i16,
27586        zmag: 0_i16,
27587        temperature: 0_i16,
27588    };
27589    #[cfg(feature = "arbitrary")]
27590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27591        use arbitrary::{Arbitrary, Unstructured};
27592        let mut buf = [0u8; 1024];
27593        rng.fill_bytes(&mut buf);
27594        let mut unstructured = Unstructured::new(&buf);
27595        Self::arbitrary(&mut unstructured).unwrap_or_default()
27596    }
27597}
27598impl Default for SCALED_IMU2_DATA {
27599    fn default() -> Self {
27600        Self::DEFAULT.clone()
27601    }
27602}
27603impl MessageData for SCALED_IMU2_DATA {
27604    type Message = MavMessage;
27605    const ID: u32 = 116u32;
27606    const NAME: &'static str = "SCALED_IMU2";
27607    const EXTRA_CRC: u8 = 76u8;
27608    const ENCODED_LEN: usize = 24usize;
27609    fn deser(
27610        _version: MavlinkVersion,
27611        __input: &[u8],
27612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27613        let avail_len = __input.len();
27614        let mut payload_buf = [0; Self::ENCODED_LEN];
27615        let mut buf = if avail_len < Self::ENCODED_LEN {
27616            payload_buf[0..avail_len].copy_from_slice(__input);
27617            Bytes::new(&payload_buf)
27618        } else {
27619            Bytes::new(__input)
27620        };
27621        let mut __struct = Self::default();
27622        __struct.time_boot_ms = buf.get_u32_le();
27623        __struct.xacc = buf.get_i16_le();
27624        __struct.yacc = buf.get_i16_le();
27625        __struct.zacc = buf.get_i16_le();
27626        __struct.xgyro = buf.get_i16_le();
27627        __struct.ygyro = buf.get_i16_le();
27628        __struct.zgyro = buf.get_i16_le();
27629        __struct.xmag = buf.get_i16_le();
27630        __struct.ymag = buf.get_i16_le();
27631        __struct.zmag = buf.get_i16_le();
27632        __struct.temperature = buf.get_i16_le();
27633        Ok(__struct)
27634    }
27635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27636        let mut __tmp = BytesMut::new(bytes);
27637        #[allow(clippy::absurd_extreme_comparisons)]
27638        #[allow(unused_comparisons)]
27639        if __tmp.remaining() < Self::ENCODED_LEN {
27640            panic!(
27641                "buffer is too small (need {} bytes, but got {})",
27642                Self::ENCODED_LEN,
27643                __tmp.remaining(),
27644            )
27645        }
27646        __tmp.put_u32_le(self.time_boot_ms);
27647        __tmp.put_i16_le(self.xacc);
27648        __tmp.put_i16_le(self.yacc);
27649        __tmp.put_i16_le(self.zacc);
27650        __tmp.put_i16_le(self.xgyro);
27651        __tmp.put_i16_le(self.ygyro);
27652        __tmp.put_i16_le(self.zgyro);
27653        __tmp.put_i16_le(self.xmag);
27654        __tmp.put_i16_le(self.ymag);
27655        __tmp.put_i16_le(self.zmag);
27656        if matches!(version, MavlinkVersion::V2) {
27657            __tmp.put_i16_le(self.temperature);
27658            let len = __tmp.len();
27659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27660        } else {
27661            __tmp.len()
27662        }
27663    }
27664}
27665#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27666#[doc = ""]
27667#[doc = "ID: 129"]
27668#[derive(Debug, Clone, PartialEq)]
27669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27671#[cfg_attr(feature = "ts", derive(TS))]
27672#[cfg_attr(feature = "ts", ts(export))]
27673pub struct SCALED_IMU3_DATA {
27674    #[doc = "Timestamp (time since system boot)."]
27675    pub time_boot_ms: u32,
27676    #[doc = "X acceleration"]
27677    pub xacc: i16,
27678    #[doc = "Y acceleration"]
27679    pub yacc: i16,
27680    #[doc = "Z acceleration"]
27681    pub zacc: i16,
27682    #[doc = "Angular speed around X axis"]
27683    pub xgyro: i16,
27684    #[doc = "Angular speed around Y axis"]
27685    pub ygyro: i16,
27686    #[doc = "Angular speed around Z axis"]
27687    pub zgyro: i16,
27688    #[doc = "X Magnetic field"]
27689    pub xmag: i16,
27690    #[doc = "Y Magnetic field"]
27691    pub ymag: i16,
27692    #[doc = "Z Magnetic field"]
27693    pub zmag: i16,
27694    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27696    pub temperature: i16,
27697}
27698impl SCALED_IMU3_DATA {
27699    pub const ENCODED_LEN: usize = 24usize;
27700    pub const DEFAULT: Self = Self {
27701        time_boot_ms: 0_u32,
27702        xacc: 0_i16,
27703        yacc: 0_i16,
27704        zacc: 0_i16,
27705        xgyro: 0_i16,
27706        ygyro: 0_i16,
27707        zgyro: 0_i16,
27708        xmag: 0_i16,
27709        ymag: 0_i16,
27710        zmag: 0_i16,
27711        temperature: 0_i16,
27712    };
27713    #[cfg(feature = "arbitrary")]
27714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27715        use arbitrary::{Arbitrary, Unstructured};
27716        let mut buf = [0u8; 1024];
27717        rng.fill_bytes(&mut buf);
27718        let mut unstructured = Unstructured::new(&buf);
27719        Self::arbitrary(&mut unstructured).unwrap_or_default()
27720    }
27721}
27722impl Default for SCALED_IMU3_DATA {
27723    fn default() -> Self {
27724        Self::DEFAULT.clone()
27725    }
27726}
27727impl MessageData for SCALED_IMU3_DATA {
27728    type Message = MavMessage;
27729    const ID: u32 = 129u32;
27730    const NAME: &'static str = "SCALED_IMU3";
27731    const EXTRA_CRC: u8 = 46u8;
27732    const ENCODED_LEN: usize = 24usize;
27733    fn deser(
27734        _version: MavlinkVersion,
27735        __input: &[u8],
27736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27737        let avail_len = __input.len();
27738        let mut payload_buf = [0; Self::ENCODED_LEN];
27739        let mut buf = if avail_len < Self::ENCODED_LEN {
27740            payload_buf[0..avail_len].copy_from_slice(__input);
27741            Bytes::new(&payload_buf)
27742        } else {
27743            Bytes::new(__input)
27744        };
27745        let mut __struct = Self::default();
27746        __struct.time_boot_ms = buf.get_u32_le();
27747        __struct.xacc = buf.get_i16_le();
27748        __struct.yacc = buf.get_i16_le();
27749        __struct.zacc = buf.get_i16_le();
27750        __struct.xgyro = buf.get_i16_le();
27751        __struct.ygyro = buf.get_i16_le();
27752        __struct.zgyro = buf.get_i16_le();
27753        __struct.xmag = buf.get_i16_le();
27754        __struct.ymag = buf.get_i16_le();
27755        __struct.zmag = buf.get_i16_le();
27756        __struct.temperature = buf.get_i16_le();
27757        Ok(__struct)
27758    }
27759    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27760        let mut __tmp = BytesMut::new(bytes);
27761        #[allow(clippy::absurd_extreme_comparisons)]
27762        #[allow(unused_comparisons)]
27763        if __tmp.remaining() < Self::ENCODED_LEN {
27764            panic!(
27765                "buffer is too small (need {} bytes, but got {})",
27766                Self::ENCODED_LEN,
27767                __tmp.remaining(),
27768            )
27769        }
27770        __tmp.put_u32_le(self.time_boot_ms);
27771        __tmp.put_i16_le(self.xacc);
27772        __tmp.put_i16_le(self.yacc);
27773        __tmp.put_i16_le(self.zacc);
27774        __tmp.put_i16_le(self.xgyro);
27775        __tmp.put_i16_le(self.ygyro);
27776        __tmp.put_i16_le(self.zgyro);
27777        __tmp.put_i16_le(self.xmag);
27778        __tmp.put_i16_le(self.ymag);
27779        __tmp.put_i16_le(self.zmag);
27780        if matches!(version, MavlinkVersion::V2) {
27781            __tmp.put_i16_le(self.temperature);
27782            let len = __tmp.len();
27783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27784        } else {
27785            __tmp.len()
27786        }
27787    }
27788}
27789#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27790#[doc = ""]
27791#[doc = "ID: 29"]
27792#[derive(Debug, Clone, PartialEq)]
27793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27795#[cfg_attr(feature = "ts", derive(TS))]
27796#[cfg_attr(feature = "ts", ts(export))]
27797pub struct SCALED_PRESSURE_DATA {
27798    #[doc = "Timestamp (time since system boot)."]
27799    pub time_boot_ms: u32,
27800    #[doc = "Absolute pressure"]
27801    pub press_abs: f32,
27802    #[doc = "Differential pressure 1"]
27803    pub press_diff: f32,
27804    #[doc = "Absolute pressure temperature"]
27805    pub temperature: i16,
27806    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27808    pub temperature_press_diff: i16,
27809}
27810impl SCALED_PRESSURE_DATA {
27811    pub const ENCODED_LEN: usize = 16usize;
27812    pub const DEFAULT: Self = Self {
27813        time_boot_ms: 0_u32,
27814        press_abs: 0.0_f32,
27815        press_diff: 0.0_f32,
27816        temperature: 0_i16,
27817        temperature_press_diff: 0_i16,
27818    };
27819    #[cfg(feature = "arbitrary")]
27820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27821        use arbitrary::{Arbitrary, Unstructured};
27822        let mut buf = [0u8; 1024];
27823        rng.fill_bytes(&mut buf);
27824        let mut unstructured = Unstructured::new(&buf);
27825        Self::arbitrary(&mut unstructured).unwrap_or_default()
27826    }
27827}
27828impl Default for SCALED_PRESSURE_DATA {
27829    fn default() -> Self {
27830        Self::DEFAULT.clone()
27831    }
27832}
27833impl MessageData for SCALED_PRESSURE_DATA {
27834    type Message = MavMessage;
27835    const ID: u32 = 29u32;
27836    const NAME: &'static str = "SCALED_PRESSURE";
27837    const EXTRA_CRC: u8 = 115u8;
27838    const ENCODED_LEN: usize = 16usize;
27839    fn deser(
27840        _version: MavlinkVersion,
27841        __input: &[u8],
27842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27843        let avail_len = __input.len();
27844        let mut payload_buf = [0; Self::ENCODED_LEN];
27845        let mut buf = if avail_len < Self::ENCODED_LEN {
27846            payload_buf[0..avail_len].copy_from_slice(__input);
27847            Bytes::new(&payload_buf)
27848        } else {
27849            Bytes::new(__input)
27850        };
27851        let mut __struct = Self::default();
27852        __struct.time_boot_ms = buf.get_u32_le();
27853        __struct.press_abs = buf.get_f32_le();
27854        __struct.press_diff = buf.get_f32_le();
27855        __struct.temperature = buf.get_i16_le();
27856        __struct.temperature_press_diff = buf.get_i16_le();
27857        Ok(__struct)
27858    }
27859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27860        let mut __tmp = BytesMut::new(bytes);
27861        #[allow(clippy::absurd_extreme_comparisons)]
27862        #[allow(unused_comparisons)]
27863        if __tmp.remaining() < Self::ENCODED_LEN {
27864            panic!(
27865                "buffer is too small (need {} bytes, but got {})",
27866                Self::ENCODED_LEN,
27867                __tmp.remaining(),
27868            )
27869        }
27870        __tmp.put_u32_le(self.time_boot_ms);
27871        __tmp.put_f32_le(self.press_abs);
27872        __tmp.put_f32_le(self.press_diff);
27873        __tmp.put_i16_le(self.temperature);
27874        if matches!(version, MavlinkVersion::V2) {
27875            __tmp.put_i16_le(self.temperature_press_diff);
27876            let len = __tmp.len();
27877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27878        } else {
27879            __tmp.len()
27880        }
27881    }
27882}
27883#[doc = "Barometer readings for 2nd barometer."]
27884#[doc = ""]
27885#[doc = "ID: 137"]
27886#[derive(Debug, Clone, PartialEq)]
27887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27889#[cfg_attr(feature = "ts", derive(TS))]
27890#[cfg_attr(feature = "ts", ts(export))]
27891pub struct SCALED_PRESSURE2_DATA {
27892    #[doc = "Timestamp (time since system boot)."]
27893    pub time_boot_ms: u32,
27894    #[doc = "Absolute pressure"]
27895    pub press_abs: f32,
27896    #[doc = "Differential pressure"]
27897    pub press_diff: f32,
27898    #[doc = "Absolute pressure temperature"]
27899    pub temperature: i16,
27900    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27901    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27902    pub temperature_press_diff: i16,
27903}
27904impl SCALED_PRESSURE2_DATA {
27905    pub const ENCODED_LEN: usize = 16usize;
27906    pub const DEFAULT: Self = Self {
27907        time_boot_ms: 0_u32,
27908        press_abs: 0.0_f32,
27909        press_diff: 0.0_f32,
27910        temperature: 0_i16,
27911        temperature_press_diff: 0_i16,
27912    };
27913    #[cfg(feature = "arbitrary")]
27914    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27915        use arbitrary::{Arbitrary, Unstructured};
27916        let mut buf = [0u8; 1024];
27917        rng.fill_bytes(&mut buf);
27918        let mut unstructured = Unstructured::new(&buf);
27919        Self::arbitrary(&mut unstructured).unwrap_or_default()
27920    }
27921}
27922impl Default for SCALED_PRESSURE2_DATA {
27923    fn default() -> Self {
27924        Self::DEFAULT.clone()
27925    }
27926}
27927impl MessageData for SCALED_PRESSURE2_DATA {
27928    type Message = MavMessage;
27929    const ID: u32 = 137u32;
27930    const NAME: &'static str = "SCALED_PRESSURE2";
27931    const EXTRA_CRC: u8 = 195u8;
27932    const ENCODED_LEN: usize = 16usize;
27933    fn deser(
27934        _version: MavlinkVersion,
27935        __input: &[u8],
27936    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27937        let avail_len = __input.len();
27938        let mut payload_buf = [0; Self::ENCODED_LEN];
27939        let mut buf = if avail_len < Self::ENCODED_LEN {
27940            payload_buf[0..avail_len].copy_from_slice(__input);
27941            Bytes::new(&payload_buf)
27942        } else {
27943            Bytes::new(__input)
27944        };
27945        let mut __struct = Self::default();
27946        __struct.time_boot_ms = buf.get_u32_le();
27947        __struct.press_abs = buf.get_f32_le();
27948        __struct.press_diff = buf.get_f32_le();
27949        __struct.temperature = buf.get_i16_le();
27950        __struct.temperature_press_diff = buf.get_i16_le();
27951        Ok(__struct)
27952    }
27953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27954        let mut __tmp = BytesMut::new(bytes);
27955        #[allow(clippy::absurd_extreme_comparisons)]
27956        #[allow(unused_comparisons)]
27957        if __tmp.remaining() < Self::ENCODED_LEN {
27958            panic!(
27959                "buffer is too small (need {} bytes, but got {})",
27960                Self::ENCODED_LEN,
27961                __tmp.remaining(),
27962            )
27963        }
27964        __tmp.put_u32_le(self.time_boot_ms);
27965        __tmp.put_f32_le(self.press_abs);
27966        __tmp.put_f32_le(self.press_diff);
27967        __tmp.put_i16_le(self.temperature);
27968        if matches!(version, MavlinkVersion::V2) {
27969            __tmp.put_i16_le(self.temperature_press_diff);
27970            let len = __tmp.len();
27971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27972        } else {
27973            __tmp.len()
27974        }
27975    }
27976}
27977#[doc = "Barometer readings for 3rd barometer."]
27978#[doc = ""]
27979#[doc = "ID: 143"]
27980#[derive(Debug, Clone, PartialEq)]
27981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27983#[cfg_attr(feature = "ts", derive(TS))]
27984#[cfg_attr(feature = "ts", ts(export))]
27985pub struct SCALED_PRESSURE3_DATA {
27986    #[doc = "Timestamp (time since system boot)."]
27987    pub time_boot_ms: u32,
27988    #[doc = "Absolute pressure"]
27989    pub press_abs: f32,
27990    #[doc = "Differential pressure"]
27991    pub press_diff: f32,
27992    #[doc = "Absolute pressure temperature"]
27993    pub temperature: i16,
27994    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27995    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27996    pub temperature_press_diff: i16,
27997}
27998impl SCALED_PRESSURE3_DATA {
27999    pub const ENCODED_LEN: usize = 16usize;
28000    pub const DEFAULT: Self = Self {
28001        time_boot_ms: 0_u32,
28002        press_abs: 0.0_f32,
28003        press_diff: 0.0_f32,
28004        temperature: 0_i16,
28005        temperature_press_diff: 0_i16,
28006    };
28007    #[cfg(feature = "arbitrary")]
28008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28009        use arbitrary::{Arbitrary, Unstructured};
28010        let mut buf = [0u8; 1024];
28011        rng.fill_bytes(&mut buf);
28012        let mut unstructured = Unstructured::new(&buf);
28013        Self::arbitrary(&mut unstructured).unwrap_or_default()
28014    }
28015}
28016impl Default for SCALED_PRESSURE3_DATA {
28017    fn default() -> Self {
28018        Self::DEFAULT.clone()
28019    }
28020}
28021impl MessageData for SCALED_PRESSURE3_DATA {
28022    type Message = MavMessage;
28023    const ID: u32 = 143u32;
28024    const NAME: &'static str = "SCALED_PRESSURE3";
28025    const EXTRA_CRC: u8 = 131u8;
28026    const ENCODED_LEN: usize = 16usize;
28027    fn deser(
28028        _version: MavlinkVersion,
28029        __input: &[u8],
28030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28031        let avail_len = __input.len();
28032        let mut payload_buf = [0; Self::ENCODED_LEN];
28033        let mut buf = if avail_len < Self::ENCODED_LEN {
28034            payload_buf[0..avail_len].copy_from_slice(__input);
28035            Bytes::new(&payload_buf)
28036        } else {
28037            Bytes::new(__input)
28038        };
28039        let mut __struct = Self::default();
28040        __struct.time_boot_ms = buf.get_u32_le();
28041        __struct.press_abs = buf.get_f32_le();
28042        __struct.press_diff = buf.get_f32_le();
28043        __struct.temperature = buf.get_i16_le();
28044        __struct.temperature_press_diff = buf.get_i16_le();
28045        Ok(__struct)
28046    }
28047    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28048        let mut __tmp = BytesMut::new(bytes);
28049        #[allow(clippy::absurd_extreme_comparisons)]
28050        #[allow(unused_comparisons)]
28051        if __tmp.remaining() < Self::ENCODED_LEN {
28052            panic!(
28053                "buffer is too small (need {} bytes, but got {})",
28054                Self::ENCODED_LEN,
28055                __tmp.remaining(),
28056            )
28057        }
28058        __tmp.put_u32_le(self.time_boot_ms);
28059        __tmp.put_f32_le(self.press_abs);
28060        __tmp.put_f32_le(self.press_diff);
28061        __tmp.put_i16_le(self.temperature);
28062        if matches!(version, MavlinkVersion::V2) {
28063            __tmp.put_i16_le(self.temperature_press_diff);
28064            let len = __tmp.len();
28065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28066        } else {
28067            __tmp.len()
28068        }
28069    }
28070}
28071#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
28072#[doc = ""]
28073#[doc = "ID: 126"]
28074#[derive(Debug, Clone, PartialEq)]
28075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28077#[cfg_attr(feature = "ts", derive(TS))]
28078#[cfg_attr(feature = "ts", ts(export))]
28079pub struct SERIAL_CONTROL_DATA {
28080    #[doc = "Baudrate of transfer. Zero means no change."]
28081    pub baudrate: u32,
28082    #[doc = "Timeout for reply data"]
28083    pub timeout: u16,
28084    #[doc = "Serial control device type."]
28085    pub device: SerialControlDev,
28086    #[doc = "Bitmap of serial control flags."]
28087    pub flags: SerialControlFlag,
28088    #[doc = "how many bytes in this transfer"]
28089    pub count: u8,
28090    #[doc = "serial data"]
28091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28092    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28093    pub data: [u8; 70],
28094    #[doc = "System ID"]
28095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28096    pub target_system: u8,
28097    #[doc = "Component ID"]
28098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28099    pub target_component: u8,
28100}
28101impl SERIAL_CONTROL_DATA {
28102    pub const ENCODED_LEN: usize = 81usize;
28103    pub const DEFAULT: Self = Self {
28104        baudrate: 0_u32,
28105        timeout: 0_u16,
28106        device: SerialControlDev::DEFAULT,
28107        flags: SerialControlFlag::DEFAULT,
28108        count: 0_u8,
28109        data: [0_u8; 70usize],
28110        target_system: 0_u8,
28111        target_component: 0_u8,
28112    };
28113    #[cfg(feature = "arbitrary")]
28114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28115        use arbitrary::{Arbitrary, Unstructured};
28116        let mut buf = [0u8; 1024];
28117        rng.fill_bytes(&mut buf);
28118        let mut unstructured = Unstructured::new(&buf);
28119        Self::arbitrary(&mut unstructured).unwrap_or_default()
28120    }
28121}
28122impl Default for SERIAL_CONTROL_DATA {
28123    fn default() -> Self {
28124        Self::DEFAULT.clone()
28125    }
28126}
28127impl MessageData for SERIAL_CONTROL_DATA {
28128    type Message = MavMessage;
28129    const ID: u32 = 126u32;
28130    const NAME: &'static str = "SERIAL_CONTROL";
28131    const EXTRA_CRC: u8 = 220u8;
28132    const ENCODED_LEN: usize = 81usize;
28133    fn deser(
28134        _version: MavlinkVersion,
28135        __input: &[u8],
28136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28137        let avail_len = __input.len();
28138        let mut payload_buf = [0; Self::ENCODED_LEN];
28139        let mut buf = if avail_len < Self::ENCODED_LEN {
28140            payload_buf[0..avail_len].copy_from_slice(__input);
28141            Bytes::new(&payload_buf)
28142        } else {
28143            Bytes::new(__input)
28144        };
28145        let mut __struct = Self::default();
28146        __struct.baudrate = buf.get_u32_le();
28147        __struct.timeout = buf.get_u16_le();
28148        let tmp = buf.get_u8();
28149        __struct.device =
28150            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28151                enum_type: "SerialControlDev",
28152                value: tmp as u32,
28153            })?;
28154        let tmp = buf.get_u8();
28155        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
28156            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28157                flag_type: "SerialControlFlag",
28158                value: tmp as u32,
28159            })?;
28160        __struct.count = buf.get_u8();
28161        for v in &mut __struct.data {
28162            let val = buf.get_u8();
28163            *v = val;
28164        }
28165        __struct.target_system = buf.get_u8();
28166        __struct.target_component = buf.get_u8();
28167        Ok(__struct)
28168    }
28169    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28170        let mut __tmp = BytesMut::new(bytes);
28171        #[allow(clippy::absurd_extreme_comparisons)]
28172        #[allow(unused_comparisons)]
28173        if __tmp.remaining() < Self::ENCODED_LEN {
28174            panic!(
28175                "buffer is too small (need {} bytes, but got {})",
28176                Self::ENCODED_LEN,
28177                __tmp.remaining(),
28178            )
28179        }
28180        __tmp.put_u32_le(self.baudrate);
28181        __tmp.put_u16_le(self.timeout);
28182        __tmp.put_u8(self.device as u8);
28183        __tmp.put_u8(self.flags.bits());
28184        __tmp.put_u8(self.count);
28185        for val in &self.data {
28186            __tmp.put_u8(*val);
28187        }
28188        if matches!(version, MavlinkVersion::V2) {
28189            __tmp.put_u8(self.target_system);
28190            __tmp.put_u8(self.target_component);
28191            let len = __tmp.len();
28192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28193        } else {
28194            __tmp.len()
28195        }
28196    }
28197}
28198#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
28199#[doc = ""]
28200#[doc = "ID: 36"]
28201#[derive(Debug, Clone, PartialEq)]
28202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28204#[cfg_attr(feature = "ts", derive(TS))]
28205#[cfg_attr(feature = "ts", ts(export))]
28206pub struct SERVO_OUTPUT_RAW_DATA {
28207    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28208    pub time_usec: u32,
28209    #[doc = "Servo output 1 value"]
28210    pub servo1_raw: u16,
28211    #[doc = "Servo output 2 value"]
28212    pub servo2_raw: u16,
28213    #[doc = "Servo output 3 value"]
28214    pub servo3_raw: u16,
28215    #[doc = "Servo output 4 value"]
28216    pub servo4_raw: u16,
28217    #[doc = "Servo output 5 value"]
28218    pub servo5_raw: u16,
28219    #[doc = "Servo output 6 value"]
28220    pub servo6_raw: u16,
28221    #[doc = "Servo output 7 value"]
28222    pub servo7_raw: u16,
28223    #[doc = "Servo output 8 value"]
28224    pub servo8_raw: u16,
28225    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28226    pub port: u8,
28227    #[doc = "Servo output 9 value"]
28228    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28229    pub servo9_raw: u16,
28230    #[doc = "Servo output 10 value"]
28231    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28232    pub servo10_raw: u16,
28233    #[doc = "Servo output 11 value"]
28234    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28235    pub servo11_raw: u16,
28236    #[doc = "Servo output 12 value"]
28237    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28238    pub servo12_raw: u16,
28239    #[doc = "Servo output 13 value"]
28240    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28241    pub servo13_raw: u16,
28242    #[doc = "Servo output 14 value"]
28243    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28244    pub servo14_raw: u16,
28245    #[doc = "Servo output 15 value"]
28246    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28247    pub servo15_raw: u16,
28248    #[doc = "Servo output 16 value"]
28249    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28250    pub servo16_raw: u16,
28251}
28252impl SERVO_OUTPUT_RAW_DATA {
28253    pub const ENCODED_LEN: usize = 37usize;
28254    pub const DEFAULT: Self = Self {
28255        time_usec: 0_u32,
28256        servo1_raw: 0_u16,
28257        servo2_raw: 0_u16,
28258        servo3_raw: 0_u16,
28259        servo4_raw: 0_u16,
28260        servo5_raw: 0_u16,
28261        servo6_raw: 0_u16,
28262        servo7_raw: 0_u16,
28263        servo8_raw: 0_u16,
28264        port: 0_u8,
28265        servo9_raw: 0_u16,
28266        servo10_raw: 0_u16,
28267        servo11_raw: 0_u16,
28268        servo12_raw: 0_u16,
28269        servo13_raw: 0_u16,
28270        servo14_raw: 0_u16,
28271        servo15_raw: 0_u16,
28272        servo16_raw: 0_u16,
28273    };
28274    #[cfg(feature = "arbitrary")]
28275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28276        use arbitrary::{Arbitrary, Unstructured};
28277        let mut buf = [0u8; 1024];
28278        rng.fill_bytes(&mut buf);
28279        let mut unstructured = Unstructured::new(&buf);
28280        Self::arbitrary(&mut unstructured).unwrap_or_default()
28281    }
28282}
28283impl Default for SERVO_OUTPUT_RAW_DATA {
28284    fn default() -> Self {
28285        Self::DEFAULT.clone()
28286    }
28287}
28288impl MessageData for SERVO_OUTPUT_RAW_DATA {
28289    type Message = MavMessage;
28290    const ID: u32 = 36u32;
28291    const NAME: &'static str = "SERVO_OUTPUT_RAW";
28292    const EXTRA_CRC: u8 = 222u8;
28293    const ENCODED_LEN: usize = 37usize;
28294    fn deser(
28295        _version: MavlinkVersion,
28296        __input: &[u8],
28297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28298        let avail_len = __input.len();
28299        let mut payload_buf = [0; Self::ENCODED_LEN];
28300        let mut buf = if avail_len < Self::ENCODED_LEN {
28301            payload_buf[0..avail_len].copy_from_slice(__input);
28302            Bytes::new(&payload_buf)
28303        } else {
28304            Bytes::new(__input)
28305        };
28306        let mut __struct = Self::default();
28307        __struct.time_usec = buf.get_u32_le();
28308        __struct.servo1_raw = buf.get_u16_le();
28309        __struct.servo2_raw = buf.get_u16_le();
28310        __struct.servo3_raw = buf.get_u16_le();
28311        __struct.servo4_raw = buf.get_u16_le();
28312        __struct.servo5_raw = buf.get_u16_le();
28313        __struct.servo6_raw = buf.get_u16_le();
28314        __struct.servo7_raw = buf.get_u16_le();
28315        __struct.servo8_raw = buf.get_u16_le();
28316        __struct.port = buf.get_u8();
28317        __struct.servo9_raw = buf.get_u16_le();
28318        __struct.servo10_raw = buf.get_u16_le();
28319        __struct.servo11_raw = buf.get_u16_le();
28320        __struct.servo12_raw = buf.get_u16_le();
28321        __struct.servo13_raw = buf.get_u16_le();
28322        __struct.servo14_raw = buf.get_u16_le();
28323        __struct.servo15_raw = buf.get_u16_le();
28324        __struct.servo16_raw = buf.get_u16_le();
28325        Ok(__struct)
28326    }
28327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28328        let mut __tmp = BytesMut::new(bytes);
28329        #[allow(clippy::absurd_extreme_comparisons)]
28330        #[allow(unused_comparisons)]
28331        if __tmp.remaining() < Self::ENCODED_LEN {
28332            panic!(
28333                "buffer is too small (need {} bytes, but got {})",
28334                Self::ENCODED_LEN,
28335                __tmp.remaining(),
28336            )
28337        }
28338        __tmp.put_u32_le(self.time_usec);
28339        __tmp.put_u16_le(self.servo1_raw);
28340        __tmp.put_u16_le(self.servo2_raw);
28341        __tmp.put_u16_le(self.servo3_raw);
28342        __tmp.put_u16_le(self.servo4_raw);
28343        __tmp.put_u16_le(self.servo5_raw);
28344        __tmp.put_u16_le(self.servo6_raw);
28345        __tmp.put_u16_le(self.servo7_raw);
28346        __tmp.put_u16_le(self.servo8_raw);
28347        __tmp.put_u8(self.port);
28348        if matches!(version, MavlinkVersion::V2) {
28349            __tmp.put_u16_le(self.servo9_raw);
28350            __tmp.put_u16_le(self.servo10_raw);
28351            __tmp.put_u16_le(self.servo11_raw);
28352            __tmp.put_u16_le(self.servo12_raw);
28353            __tmp.put_u16_le(self.servo13_raw);
28354            __tmp.put_u16_le(self.servo14_raw);
28355            __tmp.put_u16_le(self.servo15_raw);
28356            __tmp.put_u16_le(self.servo16_raw);
28357            let len = __tmp.len();
28358            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28359        } else {
28360            __tmp.len()
28361        }
28362    }
28363}
28364#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
28365#[doc = ""]
28366#[doc = "ID: 256"]
28367#[derive(Debug, Clone, PartialEq)]
28368#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28370#[cfg_attr(feature = "ts", derive(TS))]
28371#[cfg_attr(feature = "ts", ts(export))]
28372pub struct SETUP_SIGNING_DATA {
28373    #[doc = "initial timestamp"]
28374    pub initial_timestamp: u64,
28375    #[doc = "system id of the target"]
28376    pub target_system: u8,
28377    #[doc = "component ID of the target"]
28378    pub target_component: u8,
28379    #[doc = "signing key"]
28380    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28381    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28382    pub secret_key: [u8; 32],
28383}
28384impl SETUP_SIGNING_DATA {
28385    pub const ENCODED_LEN: usize = 42usize;
28386    pub const DEFAULT: Self = Self {
28387        initial_timestamp: 0_u64,
28388        target_system: 0_u8,
28389        target_component: 0_u8,
28390        secret_key: [0_u8; 32usize],
28391    };
28392    #[cfg(feature = "arbitrary")]
28393    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28394        use arbitrary::{Arbitrary, Unstructured};
28395        let mut buf = [0u8; 1024];
28396        rng.fill_bytes(&mut buf);
28397        let mut unstructured = Unstructured::new(&buf);
28398        Self::arbitrary(&mut unstructured).unwrap_or_default()
28399    }
28400}
28401impl Default for SETUP_SIGNING_DATA {
28402    fn default() -> Self {
28403        Self::DEFAULT.clone()
28404    }
28405}
28406impl MessageData for SETUP_SIGNING_DATA {
28407    type Message = MavMessage;
28408    const ID: u32 = 256u32;
28409    const NAME: &'static str = "SETUP_SIGNING";
28410    const EXTRA_CRC: u8 = 71u8;
28411    const ENCODED_LEN: usize = 42usize;
28412    fn deser(
28413        _version: MavlinkVersion,
28414        __input: &[u8],
28415    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28416        let avail_len = __input.len();
28417        let mut payload_buf = [0; Self::ENCODED_LEN];
28418        let mut buf = if avail_len < Self::ENCODED_LEN {
28419            payload_buf[0..avail_len].copy_from_slice(__input);
28420            Bytes::new(&payload_buf)
28421        } else {
28422            Bytes::new(__input)
28423        };
28424        let mut __struct = Self::default();
28425        __struct.initial_timestamp = buf.get_u64_le();
28426        __struct.target_system = buf.get_u8();
28427        __struct.target_component = buf.get_u8();
28428        for v in &mut __struct.secret_key {
28429            let val = buf.get_u8();
28430            *v = val;
28431        }
28432        Ok(__struct)
28433    }
28434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28435        let mut __tmp = BytesMut::new(bytes);
28436        #[allow(clippy::absurd_extreme_comparisons)]
28437        #[allow(unused_comparisons)]
28438        if __tmp.remaining() < Self::ENCODED_LEN {
28439            panic!(
28440                "buffer is too small (need {} bytes, but got {})",
28441                Self::ENCODED_LEN,
28442                __tmp.remaining(),
28443            )
28444        }
28445        __tmp.put_u64_le(self.initial_timestamp);
28446        __tmp.put_u8(self.target_system);
28447        __tmp.put_u8(self.target_component);
28448        for val in &self.secret_key {
28449            __tmp.put_u8(*val);
28450        }
28451        if matches!(version, MavlinkVersion::V2) {
28452            let len = __tmp.len();
28453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28454        } else {
28455            __tmp.len()
28456        }
28457    }
28458}
28459#[doc = "Set the vehicle attitude and body angular rates."]
28460#[doc = ""]
28461#[doc = "ID: 139"]
28462#[derive(Debug, Clone, PartialEq)]
28463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28465#[cfg_attr(feature = "ts", derive(TS))]
28466#[cfg_attr(feature = "ts", ts(export))]
28467pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
28468    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28469    pub time_usec: u64,
28470    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
28471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28472    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28473    pub controls: [f32; 8],
28474    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
28475    pub group_mlx: u8,
28476    #[doc = "System ID"]
28477    pub target_system: u8,
28478    #[doc = "Component ID"]
28479    pub target_component: u8,
28480}
28481impl SET_ACTUATOR_CONTROL_TARGET_DATA {
28482    pub const ENCODED_LEN: usize = 43usize;
28483    pub const DEFAULT: Self = Self {
28484        time_usec: 0_u64,
28485        controls: [0.0_f32; 8usize],
28486        group_mlx: 0_u8,
28487        target_system: 0_u8,
28488        target_component: 0_u8,
28489    };
28490    #[cfg(feature = "arbitrary")]
28491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28492        use arbitrary::{Arbitrary, Unstructured};
28493        let mut buf = [0u8; 1024];
28494        rng.fill_bytes(&mut buf);
28495        let mut unstructured = Unstructured::new(&buf);
28496        Self::arbitrary(&mut unstructured).unwrap_or_default()
28497    }
28498}
28499impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
28500    fn default() -> Self {
28501        Self::DEFAULT.clone()
28502    }
28503}
28504impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
28505    type Message = MavMessage;
28506    const ID: u32 = 139u32;
28507    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
28508    const EXTRA_CRC: u8 = 168u8;
28509    const ENCODED_LEN: usize = 43usize;
28510    fn deser(
28511        _version: MavlinkVersion,
28512        __input: &[u8],
28513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28514        let avail_len = __input.len();
28515        let mut payload_buf = [0; Self::ENCODED_LEN];
28516        let mut buf = if avail_len < Self::ENCODED_LEN {
28517            payload_buf[0..avail_len].copy_from_slice(__input);
28518            Bytes::new(&payload_buf)
28519        } else {
28520            Bytes::new(__input)
28521        };
28522        let mut __struct = Self::default();
28523        __struct.time_usec = buf.get_u64_le();
28524        for v in &mut __struct.controls {
28525            let val = buf.get_f32_le();
28526            *v = val;
28527        }
28528        __struct.group_mlx = buf.get_u8();
28529        __struct.target_system = buf.get_u8();
28530        __struct.target_component = buf.get_u8();
28531        Ok(__struct)
28532    }
28533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28534        let mut __tmp = BytesMut::new(bytes);
28535        #[allow(clippy::absurd_extreme_comparisons)]
28536        #[allow(unused_comparisons)]
28537        if __tmp.remaining() < Self::ENCODED_LEN {
28538            panic!(
28539                "buffer is too small (need {} bytes, but got {})",
28540                Self::ENCODED_LEN,
28541                __tmp.remaining(),
28542            )
28543        }
28544        __tmp.put_u64_le(self.time_usec);
28545        for val in &self.controls {
28546            __tmp.put_f32_le(*val);
28547        }
28548        __tmp.put_u8(self.group_mlx);
28549        __tmp.put_u8(self.target_system);
28550        __tmp.put_u8(self.target_component);
28551        if matches!(version, MavlinkVersion::V2) {
28552            let len = __tmp.len();
28553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28554        } else {
28555            __tmp.len()
28556        }
28557    }
28558}
28559#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28560#[doc = ""]
28561#[doc = "ID: 82"]
28562#[derive(Debug, Clone, PartialEq)]
28563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28565#[cfg_attr(feature = "ts", derive(TS))]
28566#[cfg_attr(feature = "ts", ts(export))]
28567pub struct SET_ATTITUDE_TARGET_DATA {
28568    #[doc = "Timestamp (time since system boot)."]
28569    pub time_boot_ms: u32,
28570    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28571    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28572    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28573    pub q: [f32; 4],
28574    #[doc = "Body roll rate"]
28575    pub body_roll_rate: f32,
28576    #[doc = "Body pitch rate"]
28577    pub body_pitch_rate: f32,
28578    #[doc = "Body yaw rate"]
28579    pub body_yaw_rate: f32,
28580    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28581    pub thrust: f32,
28582    #[doc = "System ID"]
28583    pub target_system: u8,
28584    #[doc = "Component ID"]
28585    pub target_component: u8,
28586    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28587    pub type_mask: AttitudeTargetTypemask,
28588    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28591    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28592    pub thrust_body: [f32; 3],
28593}
28594impl SET_ATTITUDE_TARGET_DATA {
28595    pub const ENCODED_LEN: usize = 51usize;
28596    pub const DEFAULT: Self = Self {
28597        time_boot_ms: 0_u32,
28598        q: [0.0_f32; 4usize],
28599        body_roll_rate: 0.0_f32,
28600        body_pitch_rate: 0.0_f32,
28601        body_yaw_rate: 0.0_f32,
28602        thrust: 0.0_f32,
28603        target_system: 0_u8,
28604        target_component: 0_u8,
28605        type_mask: AttitudeTargetTypemask::DEFAULT,
28606        thrust_body: [0.0_f32; 3usize],
28607    };
28608    #[cfg(feature = "arbitrary")]
28609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28610        use arbitrary::{Arbitrary, Unstructured};
28611        let mut buf = [0u8; 1024];
28612        rng.fill_bytes(&mut buf);
28613        let mut unstructured = Unstructured::new(&buf);
28614        Self::arbitrary(&mut unstructured).unwrap_or_default()
28615    }
28616}
28617impl Default for SET_ATTITUDE_TARGET_DATA {
28618    fn default() -> Self {
28619        Self::DEFAULT.clone()
28620    }
28621}
28622impl MessageData for SET_ATTITUDE_TARGET_DATA {
28623    type Message = MavMessage;
28624    const ID: u32 = 82u32;
28625    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28626    const EXTRA_CRC: u8 = 49u8;
28627    const ENCODED_LEN: usize = 51usize;
28628    fn deser(
28629        _version: MavlinkVersion,
28630        __input: &[u8],
28631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28632        let avail_len = __input.len();
28633        let mut payload_buf = [0; Self::ENCODED_LEN];
28634        let mut buf = if avail_len < Self::ENCODED_LEN {
28635            payload_buf[0..avail_len].copy_from_slice(__input);
28636            Bytes::new(&payload_buf)
28637        } else {
28638            Bytes::new(__input)
28639        };
28640        let mut __struct = Self::default();
28641        __struct.time_boot_ms = buf.get_u32_le();
28642        for v in &mut __struct.q {
28643            let val = buf.get_f32_le();
28644            *v = val;
28645        }
28646        __struct.body_roll_rate = buf.get_f32_le();
28647        __struct.body_pitch_rate = buf.get_f32_le();
28648        __struct.body_yaw_rate = buf.get_f32_le();
28649        __struct.thrust = buf.get_f32_le();
28650        __struct.target_system = buf.get_u8();
28651        __struct.target_component = buf.get_u8();
28652        let tmp = buf.get_u8();
28653        __struct.type_mask = AttitudeTargetTypemask::from_bits(
28654            tmp & AttitudeTargetTypemask::all().bits(),
28655        )
28656        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28657            flag_type: "AttitudeTargetTypemask",
28658            value: tmp as u32,
28659        })?;
28660        for v in &mut __struct.thrust_body {
28661            let val = buf.get_f32_le();
28662            *v = val;
28663        }
28664        Ok(__struct)
28665    }
28666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28667        let mut __tmp = BytesMut::new(bytes);
28668        #[allow(clippy::absurd_extreme_comparisons)]
28669        #[allow(unused_comparisons)]
28670        if __tmp.remaining() < Self::ENCODED_LEN {
28671            panic!(
28672                "buffer is too small (need {} bytes, but got {})",
28673                Self::ENCODED_LEN,
28674                __tmp.remaining(),
28675            )
28676        }
28677        __tmp.put_u32_le(self.time_boot_ms);
28678        for val in &self.q {
28679            __tmp.put_f32_le(*val);
28680        }
28681        __tmp.put_f32_le(self.body_roll_rate);
28682        __tmp.put_f32_le(self.body_pitch_rate);
28683        __tmp.put_f32_le(self.body_yaw_rate);
28684        __tmp.put_f32_le(self.thrust);
28685        __tmp.put_u8(self.target_system);
28686        __tmp.put_u8(self.target_component);
28687        __tmp.put_u8(self.type_mask.bits());
28688        if matches!(version, MavlinkVersion::V2) {
28689            for val in &self.thrust_body {
28690                __tmp.put_f32_le(*val);
28691            }
28692            let len = __tmp.len();
28693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28694        } else {
28695            __tmp.len()
28696        }
28697    }
28698}
28699#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28700#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28701#[doc = ""]
28702#[doc = "ID: 48"]
28703#[derive(Debug, Clone, PartialEq)]
28704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28706#[cfg_attr(feature = "ts", derive(TS))]
28707#[cfg_attr(feature = "ts", ts(export))]
28708pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28709    #[doc = "Latitude (WGS84)"]
28710    pub latitude: i32,
28711    #[doc = "Longitude (WGS84)"]
28712    pub longitude: i32,
28713    #[doc = "Altitude (MSL). Positive for up."]
28714    pub altitude: i32,
28715    #[doc = "System ID"]
28716    pub target_system: u8,
28717    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28718    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28719    pub time_usec: u64,
28720}
28721impl SET_GPS_GLOBAL_ORIGIN_DATA {
28722    pub const ENCODED_LEN: usize = 21usize;
28723    pub const DEFAULT: Self = Self {
28724        latitude: 0_i32,
28725        longitude: 0_i32,
28726        altitude: 0_i32,
28727        target_system: 0_u8,
28728        time_usec: 0_u64,
28729    };
28730    #[cfg(feature = "arbitrary")]
28731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28732        use arbitrary::{Arbitrary, Unstructured};
28733        let mut buf = [0u8; 1024];
28734        rng.fill_bytes(&mut buf);
28735        let mut unstructured = Unstructured::new(&buf);
28736        Self::arbitrary(&mut unstructured).unwrap_or_default()
28737    }
28738}
28739impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28740    fn default() -> Self {
28741        Self::DEFAULT.clone()
28742    }
28743}
28744impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28745    type Message = MavMessage;
28746    const ID: u32 = 48u32;
28747    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28748    const EXTRA_CRC: u8 = 41u8;
28749    const ENCODED_LEN: usize = 21usize;
28750    fn deser(
28751        _version: MavlinkVersion,
28752        __input: &[u8],
28753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28754        let avail_len = __input.len();
28755        let mut payload_buf = [0; Self::ENCODED_LEN];
28756        let mut buf = if avail_len < Self::ENCODED_LEN {
28757            payload_buf[0..avail_len].copy_from_slice(__input);
28758            Bytes::new(&payload_buf)
28759        } else {
28760            Bytes::new(__input)
28761        };
28762        let mut __struct = Self::default();
28763        __struct.latitude = buf.get_i32_le();
28764        __struct.longitude = buf.get_i32_le();
28765        __struct.altitude = buf.get_i32_le();
28766        __struct.target_system = buf.get_u8();
28767        __struct.time_usec = buf.get_u64_le();
28768        Ok(__struct)
28769    }
28770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28771        let mut __tmp = BytesMut::new(bytes);
28772        #[allow(clippy::absurd_extreme_comparisons)]
28773        #[allow(unused_comparisons)]
28774        if __tmp.remaining() < Self::ENCODED_LEN {
28775            panic!(
28776                "buffer is too small (need {} bytes, but got {})",
28777                Self::ENCODED_LEN,
28778                __tmp.remaining(),
28779            )
28780        }
28781        __tmp.put_i32_le(self.latitude);
28782        __tmp.put_i32_le(self.longitude);
28783        __tmp.put_i32_le(self.altitude);
28784        __tmp.put_u8(self.target_system);
28785        if matches!(version, MavlinkVersion::V2) {
28786            __tmp.put_u64_le(self.time_usec);
28787            let len = __tmp.len();
28788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28789        } else {
28790            __tmp.len()
28791        }
28792    }
28793}
28794#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28795#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28796#[doc = ""]
28797#[doc = "ID: 243"]
28798#[derive(Debug, Clone, PartialEq)]
28799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28801#[cfg_attr(feature = "ts", derive(TS))]
28802#[cfg_attr(feature = "ts", ts(export))]
28803pub struct SET_HOME_POSITION_DATA {
28804    #[doc = "Latitude (WGS84)"]
28805    pub latitude: i32,
28806    #[doc = "Longitude (WGS84)"]
28807    pub longitude: i32,
28808    #[doc = "Altitude (MSL). Positive for up."]
28809    pub altitude: i32,
28810    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28811    pub x: f32,
28812    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28813    pub y: f32,
28814    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28815    pub z: f32,
28816    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28817    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28818    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28819    pub q: [f32; 4],
28820    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28821    pub approach_x: f32,
28822    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28823    pub approach_y: f32,
28824    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28825    pub approach_z: f32,
28826    #[doc = "System ID."]
28827    pub target_system: u8,
28828    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28830    pub time_usec: u64,
28831}
28832impl SET_HOME_POSITION_DATA {
28833    pub const ENCODED_LEN: usize = 61usize;
28834    pub const DEFAULT: Self = Self {
28835        latitude: 0_i32,
28836        longitude: 0_i32,
28837        altitude: 0_i32,
28838        x: 0.0_f32,
28839        y: 0.0_f32,
28840        z: 0.0_f32,
28841        q: [0.0_f32; 4usize],
28842        approach_x: 0.0_f32,
28843        approach_y: 0.0_f32,
28844        approach_z: 0.0_f32,
28845        target_system: 0_u8,
28846        time_usec: 0_u64,
28847    };
28848    #[cfg(feature = "arbitrary")]
28849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28850        use arbitrary::{Arbitrary, Unstructured};
28851        let mut buf = [0u8; 1024];
28852        rng.fill_bytes(&mut buf);
28853        let mut unstructured = Unstructured::new(&buf);
28854        Self::arbitrary(&mut unstructured).unwrap_or_default()
28855    }
28856}
28857impl Default for SET_HOME_POSITION_DATA {
28858    fn default() -> Self {
28859        Self::DEFAULT.clone()
28860    }
28861}
28862impl MessageData for SET_HOME_POSITION_DATA {
28863    type Message = MavMessage;
28864    const ID: u32 = 243u32;
28865    const NAME: &'static str = "SET_HOME_POSITION";
28866    const EXTRA_CRC: u8 = 85u8;
28867    const ENCODED_LEN: usize = 61usize;
28868    fn deser(
28869        _version: MavlinkVersion,
28870        __input: &[u8],
28871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28872        let avail_len = __input.len();
28873        let mut payload_buf = [0; Self::ENCODED_LEN];
28874        let mut buf = if avail_len < Self::ENCODED_LEN {
28875            payload_buf[0..avail_len].copy_from_slice(__input);
28876            Bytes::new(&payload_buf)
28877        } else {
28878            Bytes::new(__input)
28879        };
28880        let mut __struct = Self::default();
28881        __struct.latitude = buf.get_i32_le();
28882        __struct.longitude = buf.get_i32_le();
28883        __struct.altitude = buf.get_i32_le();
28884        __struct.x = buf.get_f32_le();
28885        __struct.y = buf.get_f32_le();
28886        __struct.z = buf.get_f32_le();
28887        for v in &mut __struct.q {
28888            let val = buf.get_f32_le();
28889            *v = val;
28890        }
28891        __struct.approach_x = buf.get_f32_le();
28892        __struct.approach_y = buf.get_f32_le();
28893        __struct.approach_z = buf.get_f32_le();
28894        __struct.target_system = buf.get_u8();
28895        __struct.time_usec = buf.get_u64_le();
28896        Ok(__struct)
28897    }
28898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28899        let mut __tmp = BytesMut::new(bytes);
28900        #[allow(clippy::absurd_extreme_comparisons)]
28901        #[allow(unused_comparisons)]
28902        if __tmp.remaining() < Self::ENCODED_LEN {
28903            panic!(
28904                "buffer is too small (need {} bytes, but got {})",
28905                Self::ENCODED_LEN,
28906                __tmp.remaining(),
28907            )
28908        }
28909        __tmp.put_i32_le(self.latitude);
28910        __tmp.put_i32_le(self.longitude);
28911        __tmp.put_i32_le(self.altitude);
28912        __tmp.put_f32_le(self.x);
28913        __tmp.put_f32_le(self.y);
28914        __tmp.put_f32_le(self.z);
28915        for val in &self.q {
28916            __tmp.put_f32_le(*val);
28917        }
28918        __tmp.put_f32_le(self.approach_x);
28919        __tmp.put_f32_le(self.approach_y);
28920        __tmp.put_f32_le(self.approach_z);
28921        __tmp.put_u8(self.target_system);
28922        if matches!(version, MavlinkVersion::V2) {
28923            __tmp.put_u64_le(self.time_usec);
28924            let len = __tmp.len();
28925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28926        } else {
28927            __tmp.len()
28928        }
28929    }
28930}
28931#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28932#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28933#[doc = ""]
28934#[doc = "ID: 11"]
28935#[derive(Debug, Clone, PartialEq)]
28936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28938#[cfg_attr(feature = "ts", derive(TS))]
28939#[cfg_attr(feature = "ts", ts(export))]
28940pub struct SET_MODE_DATA {
28941    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28942    pub custom_mode: u32,
28943    #[doc = "The system setting the mode"]
28944    pub target_system: u8,
28945    #[doc = "The new base mode."]
28946    pub base_mode: MavMode,
28947}
28948impl SET_MODE_DATA {
28949    pub const ENCODED_LEN: usize = 6usize;
28950    pub const DEFAULT: Self = Self {
28951        custom_mode: 0_u32,
28952        target_system: 0_u8,
28953        base_mode: MavMode::DEFAULT,
28954    };
28955    #[cfg(feature = "arbitrary")]
28956    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28957        use arbitrary::{Arbitrary, Unstructured};
28958        let mut buf = [0u8; 1024];
28959        rng.fill_bytes(&mut buf);
28960        let mut unstructured = Unstructured::new(&buf);
28961        Self::arbitrary(&mut unstructured).unwrap_or_default()
28962    }
28963}
28964impl Default for SET_MODE_DATA {
28965    fn default() -> Self {
28966        Self::DEFAULT.clone()
28967    }
28968}
28969impl MessageData for SET_MODE_DATA {
28970    type Message = MavMessage;
28971    const ID: u32 = 11u32;
28972    const NAME: &'static str = "SET_MODE";
28973    const EXTRA_CRC: u8 = 89u8;
28974    const ENCODED_LEN: usize = 6usize;
28975    fn deser(
28976        _version: MavlinkVersion,
28977        __input: &[u8],
28978    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28979        let avail_len = __input.len();
28980        let mut payload_buf = [0; Self::ENCODED_LEN];
28981        let mut buf = if avail_len < Self::ENCODED_LEN {
28982            payload_buf[0..avail_len].copy_from_slice(__input);
28983            Bytes::new(&payload_buf)
28984        } else {
28985            Bytes::new(__input)
28986        };
28987        let mut __struct = Self::default();
28988        __struct.custom_mode = buf.get_u32_le();
28989        __struct.target_system = buf.get_u8();
28990        let tmp = buf.get_u8();
28991        __struct.base_mode =
28992            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28993                enum_type: "MavMode",
28994                value: tmp as u32,
28995            })?;
28996        Ok(__struct)
28997    }
28998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28999        let mut __tmp = BytesMut::new(bytes);
29000        #[allow(clippy::absurd_extreme_comparisons)]
29001        #[allow(unused_comparisons)]
29002        if __tmp.remaining() < Self::ENCODED_LEN {
29003            panic!(
29004                "buffer is too small (need {} bytes, but got {})",
29005                Self::ENCODED_LEN,
29006                __tmp.remaining(),
29007            )
29008        }
29009        __tmp.put_u32_le(self.custom_mode);
29010        __tmp.put_u8(self.target_system);
29011        __tmp.put_u8(self.base_mode as u8);
29012        if matches!(version, MavlinkVersion::V2) {
29013            let len = __tmp.len();
29014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29015        } else {
29016            __tmp.len()
29017        }
29018    }
29019}
29020#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
29021#[doc = ""]
29022#[doc = "ID: 86"]
29023#[derive(Debug, Clone, PartialEq)]
29024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29026#[cfg_attr(feature = "ts", derive(TS))]
29027#[cfg_attr(feature = "ts", ts(export))]
29028pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
29029    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
29030    pub time_boot_ms: u32,
29031    #[doc = "Latitude in WGS84 frame"]
29032    pub lat_int: i32,
29033    #[doc = "Longitude in WGS84 frame"]
29034    pub lon_int: i32,
29035    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
29036    pub alt: f32,
29037    #[doc = "X velocity in NED frame"]
29038    pub vx: f32,
29039    #[doc = "Y velocity in NED frame"]
29040    pub vy: f32,
29041    #[doc = "Z velocity in NED frame"]
29042    pub vz: f32,
29043    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29044    pub afx: f32,
29045    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29046    pub afy: f32,
29047    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29048    pub afz: f32,
29049    #[doc = "yaw setpoint"]
29050    pub yaw: f32,
29051    #[doc = "yaw rate setpoint"]
29052    pub yaw_rate: f32,
29053    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29054    pub type_mask: PositionTargetTypemask,
29055    #[doc = "System ID"]
29056    pub target_system: u8,
29057    #[doc = "Component ID"]
29058    pub target_component: u8,
29059    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
29060    pub coordinate_frame: MavFrame,
29061}
29062impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
29063    pub const ENCODED_LEN: usize = 53usize;
29064    pub const DEFAULT: Self = Self {
29065        time_boot_ms: 0_u32,
29066        lat_int: 0_i32,
29067        lon_int: 0_i32,
29068        alt: 0.0_f32,
29069        vx: 0.0_f32,
29070        vy: 0.0_f32,
29071        vz: 0.0_f32,
29072        afx: 0.0_f32,
29073        afy: 0.0_f32,
29074        afz: 0.0_f32,
29075        yaw: 0.0_f32,
29076        yaw_rate: 0.0_f32,
29077        type_mask: PositionTargetTypemask::DEFAULT,
29078        target_system: 0_u8,
29079        target_component: 0_u8,
29080        coordinate_frame: MavFrame::DEFAULT,
29081    };
29082    #[cfg(feature = "arbitrary")]
29083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29084        use arbitrary::{Arbitrary, Unstructured};
29085        let mut buf = [0u8; 1024];
29086        rng.fill_bytes(&mut buf);
29087        let mut unstructured = Unstructured::new(&buf);
29088        Self::arbitrary(&mut unstructured).unwrap_or_default()
29089    }
29090}
29091impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29092    fn default() -> Self {
29093        Self::DEFAULT.clone()
29094    }
29095}
29096impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29097    type Message = MavMessage;
29098    const ID: u32 = 86u32;
29099    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
29100    const EXTRA_CRC: u8 = 5u8;
29101    const ENCODED_LEN: usize = 53usize;
29102    fn deser(
29103        _version: MavlinkVersion,
29104        __input: &[u8],
29105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29106        let avail_len = __input.len();
29107        let mut payload_buf = [0; Self::ENCODED_LEN];
29108        let mut buf = if avail_len < Self::ENCODED_LEN {
29109            payload_buf[0..avail_len].copy_from_slice(__input);
29110            Bytes::new(&payload_buf)
29111        } else {
29112            Bytes::new(__input)
29113        };
29114        let mut __struct = Self::default();
29115        __struct.time_boot_ms = buf.get_u32_le();
29116        __struct.lat_int = buf.get_i32_le();
29117        __struct.lon_int = buf.get_i32_le();
29118        __struct.alt = buf.get_f32_le();
29119        __struct.vx = buf.get_f32_le();
29120        __struct.vy = buf.get_f32_le();
29121        __struct.vz = buf.get_f32_le();
29122        __struct.afx = buf.get_f32_le();
29123        __struct.afy = buf.get_f32_le();
29124        __struct.afz = buf.get_f32_le();
29125        __struct.yaw = buf.get_f32_le();
29126        __struct.yaw_rate = buf.get_f32_le();
29127        let tmp = buf.get_u16_le();
29128        __struct.type_mask = PositionTargetTypemask::from_bits(
29129            tmp & PositionTargetTypemask::all().bits(),
29130        )
29131        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29132            flag_type: "PositionTargetTypemask",
29133            value: tmp as u32,
29134        })?;
29135        __struct.target_system = buf.get_u8();
29136        __struct.target_component = buf.get_u8();
29137        let tmp = buf.get_u8();
29138        __struct.coordinate_frame =
29139            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29140                enum_type: "MavFrame",
29141                value: tmp as u32,
29142            })?;
29143        Ok(__struct)
29144    }
29145    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29146        let mut __tmp = BytesMut::new(bytes);
29147        #[allow(clippy::absurd_extreme_comparisons)]
29148        #[allow(unused_comparisons)]
29149        if __tmp.remaining() < Self::ENCODED_LEN {
29150            panic!(
29151                "buffer is too small (need {} bytes, but got {})",
29152                Self::ENCODED_LEN,
29153                __tmp.remaining(),
29154            )
29155        }
29156        __tmp.put_u32_le(self.time_boot_ms);
29157        __tmp.put_i32_le(self.lat_int);
29158        __tmp.put_i32_le(self.lon_int);
29159        __tmp.put_f32_le(self.alt);
29160        __tmp.put_f32_le(self.vx);
29161        __tmp.put_f32_le(self.vy);
29162        __tmp.put_f32_le(self.vz);
29163        __tmp.put_f32_le(self.afx);
29164        __tmp.put_f32_le(self.afy);
29165        __tmp.put_f32_le(self.afz);
29166        __tmp.put_f32_le(self.yaw);
29167        __tmp.put_f32_le(self.yaw_rate);
29168        __tmp.put_u16_le(self.type_mask.bits());
29169        __tmp.put_u8(self.target_system);
29170        __tmp.put_u8(self.target_component);
29171        __tmp.put_u8(self.coordinate_frame as u8);
29172        if matches!(version, MavlinkVersion::V2) {
29173            let len = __tmp.len();
29174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29175        } else {
29176            __tmp.len()
29177        }
29178    }
29179}
29180#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
29181#[doc = ""]
29182#[doc = "ID: 84"]
29183#[derive(Debug, Clone, PartialEq)]
29184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29186#[cfg_attr(feature = "ts", derive(TS))]
29187#[cfg_attr(feature = "ts", ts(export))]
29188pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
29189    #[doc = "Timestamp (time since system boot)."]
29190    pub time_boot_ms: u32,
29191    #[doc = "X Position in NED frame"]
29192    pub x: f32,
29193    #[doc = "Y Position in NED frame"]
29194    pub y: f32,
29195    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
29196    pub z: f32,
29197    #[doc = "X velocity in NED frame"]
29198    pub vx: f32,
29199    #[doc = "Y velocity in NED frame"]
29200    pub vy: f32,
29201    #[doc = "Z velocity in NED frame"]
29202    pub vz: f32,
29203    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29204    pub afx: f32,
29205    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29206    pub afy: f32,
29207    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29208    pub afz: f32,
29209    #[doc = "yaw setpoint"]
29210    pub yaw: f32,
29211    #[doc = "yaw rate setpoint"]
29212    pub yaw_rate: f32,
29213    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29214    pub type_mask: PositionTargetTypemask,
29215    #[doc = "System ID"]
29216    pub target_system: u8,
29217    #[doc = "Component ID"]
29218    pub target_component: u8,
29219    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
29220    pub coordinate_frame: MavFrame,
29221}
29222impl SET_POSITION_TARGET_LOCAL_NED_DATA {
29223    pub const ENCODED_LEN: usize = 53usize;
29224    pub const DEFAULT: Self = Self {
29225        time_boot_ms: 0_u32,
29226        x: 0.0_f32,
29227        y: 0.0_f32,
29228        z: 0.0_f32,
29229        vx: 0.0_f32,
29230        vy: 0.0_f32,
29231        vz: 0.0_f32,
29232        afx: 0.0_f32,
29233        afy: 0.0_f32,
29234        afz: 0.0_f32,
29235        yaw: 0.0_f32,
29236        yaw_rate: 0.0_f32,
29237        type_mask: PositionTargetTypemask::DEFAULT,
29238        target_system: 0_u8,
29239        target_component: 0_u8,
29240        coordinate_frame: MavFrame::DEFAULT,
29241    };
29242    #[cfg(feature = "arbitrary")]
29243    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29244        use arbitrary::{Arbitrary, Unstructured};
29245        let mut buf = [0u8; 1024];
29246        rng.fill_bytes(&mut buf);
29247        let mut unstructured = Unstructured::new(&buf);
29248        Self::arbitrary(&mut unstructured).unwrap_or_default()
29249    }
29250}
29251impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
29252    fn default() -> Self {
29253        Self::DEFAULT.clone()
29254    }
29255}
29256impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
29257    type Message = MavMessage;
29258    const ID: u32 = 84u32;
29259    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
29260    const EXTRA_CRC: u8 = 143u8;
29261    const ENCODED_LEN: usize = 53usize;
29262    fn deser(
29263        _version: MavlinkVersion,
29264        __input: &[u8],
29265    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29266        let avail_len = __input.len();
29267        let mut payload_buf = [0; Self::ENCODED_LEN];
29268        let mut buf = if avail_len < Self::ENCODED_LEN {
29269            payload_buf[0..avail_len].copy_from_slice(__input);
29270            Bytes::new(&payload_buf)
29271        } else {
29272            Bytes::new(__input)
29273        };
29274        let mut __struct = Self::default();
29275        __struct.time_boot_ms = buf.get_u32_le();
29276        __struct.x = buf.get_f32_le();
29277        __struct.y = buf.get_f32_le();
29278        __struct.z = buf.get_f32_le();
29279        __struct.vx = buf.get_f32_le();
29280        __struct.vy = buf.get_f32_le();
29281        __struct.vz = buf.get_f32_le();
29282        __struct.afx = buf.get_f32_le();
29283        __struct.afy = buf.get_f32_le();
29284        __struct.afz = buf.get_f32_le();
29285        __struct.yaw = buf.get_f32_le();
29286        __struct.yaw_rate = buf.get_f32_le();
29287        let tmp = buf.get_u16_le();
29288        __struct.type_mask = PositionTargetTypemask::from_bits(
29289            tmp & PositionTargetTypemask::all().bits(),
29290        )
29291        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29292            flag_type: "PositionTargetTypemask",
29293            value: tmp as u32,
29294        })?;
29295        __struct.target_system = buf.get_u8();
29296        __struct.target_component = buf.get_u8();
29297        let tmp = buf.get_u8();
29298        __struct.coordinate_frame =
29299            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29300                enum_type: "MavFrame",
29301                value: tmp as u32,
29302            })?;
29303        Ok(__struct)
29304    }
29305    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29306        let mut __tmp = BytesMut::new(bytes);
29307        #[allow(clippy::absurd_extreme_comparisons)]
29308        #[allow(unused_comparisons)]
29309        if __tmp.remaining() < Self::ENCODED_LEN {
29310            panic!(
29311                "buffer is too small (need {} bytes, but got {})",
29312                Self::ENCODED_LEN,
29313                __tmp.remaining(),
29314            )
29315        }
29316        __tmp.put_u32_le(self.time_boot_ms);
29317        __tmp.put_f32_le(self.x);
29318        __tmp.put_f32_le(self.y);
29319        __tmp.put_f32_le(self.z);
29320        __tmp.put_f32_le(self.vx);
29321        __tmp.put_f32_le(self.vy);
29322        __tmp.put_f32_le(self.vz);
29323        __tmp.put_f32_le(self.afx);
29324        __tmp.put_f32_le(self.afy);
29325        __tmp.put_f32_le(self.afz);
29326        __tmp.put_f32_le(self.yaw);
29327        __tmp.put_f32_le(self.yaw_rate);
29328        __tmp.put_u16_le(self.type_mask.bits());
29329        __tmp.put_u8(self.target_system);
29330        __tmp.put_u8(self.target_component);
29331        __tmp.put_u8(self.coordinate_frame as u8);
29332        if matches!(version, MavlinkVersion::V2) {
29333            let len = __tmp.len();
29334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29335        } else {
29336            __tmp.len()
29337        }
29338    }
29339}
29340#[doc = "Set temporary maximum limits for horizontal speed, vertical speed and yaw rate.         The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set).         The consumer should latch the limits until a new limit is received or the mode is changed."]
29341#[doc = ""]
29342#[doc = "ID: 354"]
29343#[derive(Debug, Clone, PartialEq)]
29344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29346#[cfg_attr(feature = "ts", derive(TS))]
29347#[cfg_attr(feature = "ts", ts(export))]
29348pub struct SET_VELOCITY_LIMITS_DATA {
29349    #[doc = "Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)"]
29350    pub horizontal_speed_limit: f32,
29351    #[doc = "Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)"]
29352    pub vertical_speed_limit: f32,
29353    #[doc = "Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore)"]
29354    pub yaw_rate_limit: f32,
29355    #[doc = "System ID (0 for broadcast)."]
29356    pub target_system: u8,
29357    #[doc = "Component ID (0 for broadcast)."]
29358    pub target_component: u8,
29359}
29360impl SET_VELOCITY_LIMITS_DATA {
29361    pub const ENCODED_LEN: usize = 14usize;
29362    pub const DEFAULT: Self = Self {
29363        horizontal_speed_limit: 0.0_f32,
29364        vertical_speed_limit: 0.0_f32,
29365        yaw_rate_limit: 0.0_f32,
29366        target_system: 0_u8,
29367        target_component: 0_u8,
29368    };
29369    #[cfg(feature = "arbitrary")]
29370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29371        use arbitrary::{Arbitrary, Unstructured};
29372        let mut buf = [0u8; 1024];
29373        rng.fill_bytes(&mut buf);
29374        let mut unstructured = Unstructured::new(&buf);
29375        Self::arbitrary(&mut unstructured).unwrap_or_default()
29376    }
29377}
29378impl Default for SET_VELOCITY_LIMITS_DATA {
29379    fn default() -> Self {
29380        Self::DEFAULT.clone()
29381    }
29382}
29383impl MessageData for SET_VELOCITY_LIMITS_DATA {
29384    type Message = MavMessage;
29385    const ID: u32 = 354u32;
29386    const NAME: &'static str = "SET_VELOCITY_LIMITS";
29387    const EXTRA_CRC: u8 = 210u8;
29388    const ENCODED_LEN: usize = 14usize;
29389    fn deser(
29390        _version: MavlinkVersion,
29391        __input: &[u8],
29392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29393        let avail_len = __input.len();
29394        let mut payload_buf = [0; Self::ENCODED_LEN];
29395        let mut buf = if avail_len < Self::ENCODED_LEN {
29396            payload_buf[0..avail_len].copy_from_slice(__input);
29397            Bytes::new(&payload_buf)
29398        } else {
29399            Bytes::new(__input)
29400        };
29401        let mut __struct = Self::default();
29402        __struct.horizontal_speed_limit = buf.get_f32_le();
29403        __struct.vertical_speed_limit = buf.get_f32_le();
29404        __struct.yaw_rate_limit = buf.get_f32_le();
29405        __struct.target_system = buf.get_u8();
29406        __struct.target_component = buf.get_u8();
29407        Ok(__struct)
29408    }
29409    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29410        let mut __tmp = BytesMut::new(bytes);
29411        #[allow(clippy::absurd_extreme_comparisons)]
29412        #[allow(unused_comparisons)]
29413        if __tmp.remaining() < Self::ENCODED_LEN {
29414            panic!(
29415                "buffer is too small (need {} bytes, but got {})",
29416                Self::ENCODED_LEN,
29417                __tmp.remaining(),
29418            )
29419        }
29420        __tmp.put_f32_le(self.horizontal_speed_limit);
29421        __tmp.put_f32_le(self.vertical_speed_limit);
29422        __tmp.put_f32_le(self.yaw_rate_limit);
29423        __tmp.put_u8(self.target_system);
29424        __tmp.put_u8(self.target_component);
29425        if matches!(version, MavlinkVersion::V2) {
29426            let len = __tmp.len();
29427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29428        } else {
29429            __tmp.len()
29430        }
29431    }
29432}
29433#[doc = "Status of simulation environment, if used."]
29434#[doc = ""]
29435#[doc = "ID: 108"]
29436#[derive(Debug, Clone, PartialEq)]
29437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29439#[cfg_attr(feature = "ts", derive(TS))]
29440#[cfg_attr(feature = "ts", ts(export))]
29441pub struct SIM_STATE_DATA {
29442    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
29443    pub q1: f32,
29444    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
29445    pub q2: f32,
29446    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
29447    pub q3: f32,
29448    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
29449    pub q4: f32,
29450    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
29451    pub roll: f32,
29452    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
29453    pub pitch: f32,
29454    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
29455    pub yaw: f32,
29456    #[doc = "X acceleration"]
29457    pub xacc: f32,
29458    #[doc = "Y acceleration"]
29459    pub yacc: f32,
29460    #[doc = "Z acceleration"]
29461    pub zacc: f32,
29462    #[doc = "Angular speed around X axis"]
29463    pub xgyro: f32,
29464    #[doc = "Angular speed around Y axis"]
29465    pub ygyro: f32,
29466    #[doc = "Angular speed around Z axis"]
29467    pub zgyro: f32,
29468    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
29469    pub lat: f32,
29470    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
29471    pub lon: f32,
29472    #[doc = "Altitude"]
29473    pub alt: f32,
29474    #[doc = "Horizontal position standard deviation"]
29475    pub std_dev_horz: f32,
29476    #[doc = "Vertical position standard deviation"]
29477    pub std_dev_vert: f32,
29478    #[doc = "True velocity in north direction in earth-fixed NED frame"]
29479    pub vn: f32,
29480    #[doc = "True velocity in east direction in earth-fixed NED frame"]
29481    pub ve: f32,
29482    #[doc = "True velocity in down direction in earth-fixed NED frame"]
29483    pub vd: f32,
29484    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
29485    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29486    pub lat_int: i32,
29487    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
29488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29489    pub lon_int: i32,
29490}
29491impl SIM_STATE_DATA {
29492    pub const ENCODED_LEN: usize = 92usize;
29493    pub const DEFAULT: Self = Self {
29494        q1: 0.0_f32,
29495        q2: 0.0_f32,
29496        q3: 0.0_f32,
29497        q4: 0.0_f32,
29498        roll: 0.0_f32,
29499        pitch: 0.0_f32,
29500        yaw: 0.0_f32,
29501        xacc: 0.0_f32,
29502        yacc: 0.0_f32,
29503        zacc: 0.0_f32,
29504        xgyro: 0.0_f32,
29505        ygyro: 0.0_f32,
29506        zgyro: 0.0_f32,
29507        lat: 0.0_f32,
29508        lon: 0.0_f32,
29509        alt: 0.0_f32,
29510        std_dev_horz: 0.0_f32,
29511        std_dev_vert: 0.0_f32,
29512        vn: 0.0_f32,
29513        ve: 0.0_f32,
29514        vd: 0.0_f32,
29515        lat_int: 0_i32,
29516        lon_int: 0_i32,
29517    };
29518    #[cfg(feature = "arbitrary")]
29519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29520        use arbitrary::{Arbitrary, Unstructured};
29521        let mut buf = [0u8; 1024];
29522        rng.fill_bytes(&mut buf);
29523        let mut unstructured = Unstructured::new(&buf);
29524        Self::arbitrary(&mut unstructured).unwrap_or_default()
29525    }
29526}
29527impl Default for SIM_STATE_DATA {
29528    fn default() -> Self {
29529        Self::DEFAULT.clone()
29530    }
29531}
29532impl MessageData for SIM_STATE_DATA {
29533    type Message = MavMessage;
29534    const ID: u32 = 108u32;
29535    const NAME: &'static str = "SIM_STATE";
29536    const EXTRA_CRC: u8 = 32u8;
29537    const ENCODED_LEN: usize = 92usize;
29538    fn deser(
29539        _version: MavlinkVersion,
29540        __input: &[u8],
29541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29542        let avail_len = __input.len();
29543        let mut payload_buf = [0; Self::ENCODED_LEN];
29544        let mut buf = if avail_len < Self::ENCODED_LEN {
29545            payload_buf[0..avail_len].copy_from_slice(__input);
29546            Bytes::new(&payload_buf)
29547        } else {
29548            Bytes::new(__input)
29549        };
29550        let mut __struct = Self::default();
29551        __struct.q1 = buf.get_f32_le();
29552        __struct.q2 = buf.get_f32_le();
29553        __struct.q3 = buf.get_f32_le();
29554        __struct.q4 = buf.get_f32_le();
29555        __struct.roll = buf.get_f32_le();
29556        __struct.pitch = buf.get_f32_le();
29557        __struct.yaw = buf.get_f32_le();
29558        __struct.xacc = buf.get_f32_le();
29559        __struct.yacc = buf.get_f32_le();
29560        __struct.zacc = buf.get_f32_le();
29561        __struct.xgyro = buf.get_f32_le();
29562        __struct.ygyro = buf.get_f32_le();
29563        __struct.zgyro = buf.get_f32_le();
29564        __struct.lat = buf.get_f32_le();
29565        __struct.lon = buf.get_f32_le();
29566        __struct.alt = buf.get_f32_le();
29567        __struct.std_dev_horz = buf.get_f32_le();
29568        __struct.std_dev_vert = buf.get_f32_le();
29569        __struct.vn = buf.get_f32_le();
29570        __struct.ve = buf.get_f32_le();
29571        __struct.vd = buf.get_f32_le();
29572        __struct.lat_int = buf.get_i32_le();
29573        __struct.lon_int = buf.get_i32_le();
29574        Ok(__struct)
29575    }
29576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29577        let mut __tmp = BytesMut::new(bytes);
29578        #[allow(clippy::absurd_extreme_comparisons)]
29579        #[allow(unused_comparisons)]
29580        if __tmp.remaining() < Self::ENCODED_LEN {
29581            panic!(
29582                "buffer is too small (need {} bytes, but got {})",
29583                Self::ENCODED_LEN,
29584                __tmp.remaining(),
29585            )
29586        }
29587        __tmp.put_f32_le(self.q1);
29588        __tmp.put_f32_le(self.q2);
29589        __tmp.put_f32_le(self.q3);
29590        __tmp.put_f32_le(self.q4);
29591        __tmp.put_f32_le(self.roll);
29592        __tmp.put_f32_le(self.pitch);
29593        __tmp.put_f32_le(self.yaw);
29594        __tmp.put_f32_le(self.xacc);
29595        __tmp.put_f32_le(self.yacc);
29596        __tmp.put_f32_le(self.zacc);
29597        __tmp.put_f32_le(self.xgyro);
29598        __tmp.put_f32_le(self.ygyro);
29599        __tmp.put_f32_le(self.zgyro);
29600        __tmp.put_f32_le(self.lat);
29601        __tmp.put_f32_le(self.lon);
29602        __tmp.put_f32_le(self.alt);
29603        __tmp.put_f32_le(self.std_dev_horz);
29604        __tmp.put_f32_le(self.std_dev_vert);
29605        __tmp.put_f32_le(self.vn);
29606        __tmp.put_f32_le(self.ve);
29607        __tmp.put_f32_le(self.vd);
29608        if matches!(version, MavlinkVersion::V2) {
29609            __tmp.put_i32_le(self.lat_int);
29610            __tmp.put_i32_le(self.lon_int);
29611            let len = __tmp.len();
29612            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29613        } else {
29614            __tmp.len()
29615        }
29616    }
29617}
29618#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
29619#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
29620#[doc = ""]
29621#[doc = "ID: 370"]
29622#[derive(Debug, Clone, PartialEq)]
29623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29625#[cfg_attr(feature = "ts", derive(TS))]
29626#[cfg_attr(feature = "ts", ts(export))]
29627pub struct SMART_BATTERY_INFO_DATA {
29628    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
29629    pub capacity_full_specification: i32,
29630    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
29631    pub capacity_full: i32,
29632    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
29633    pub cycle_count: u16,
29634    #[doc = "Battery weight. 0: field not provided."]
29635    pub weight: u16,
29636    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29637    pub discharge_minimum_voltage: u16,
29638    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29639    pub charging_minimum_voltage: u16,
29640    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29641    pub resting_minimum_voltage: u16,
29642    #[doc = "Battery ID"]
29643    pub id: u8,
29644    #[doc = "Function of the battery"]
29645    pub battery_function: MavBatteryFunction,
29646    #[doc = "Type (chemistry) of the battery"]
29647    pub mavtype: MavBatteryType,
29648    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29649    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29650    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29651    pub serial_number: [u8; 16],
29652    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29654    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29655    pub device_name: [u8; 50],
29656    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29658    pub charging_maximum_voltage: u16,
29659    #[doc = "Number of battery cells in series. 0: field not provided."]
29660    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29661    pub cells_in_series: u8,
29662    #[doc = "Maximum pack discharge current. 0: field not provided."]
29663    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29664    pub discharge_maximum_current: u32,
29665    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29666    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29667    pub discharge_maximum_burst_current: u32,
29668    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29669    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29671    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29672    pub manufacture_date: [u8; 11],
29673}
29674impl SMART_BATTERY_INFO_DATA {
29675    pub const ENCODED_LEN: usize = 109usize;
29676    pub const DEFAULT: Self = Self {
29677        capacity_full_specification: 0_i32,
29678        capacity_full: 0_i32,
29679        cycle_count: 0_u16,
29680        weight: 0_u16,
29681        discharge_minimum_voltage: 0_u16,
29682        charging_minimum_voltage: 0_u16,
29683        resting_minimum_voltage: 0_u16,
29684        id: 0_u8,
29685        battery_function: MavBatteryFunction::DEFAULT,
29686        mavtype: MavBatteryType::DEFAULT,
29687        serial_number: [0_u8; 16usize],
29688        device_name: [0_u8; 50usize],
29689        charging_maximum_voltage: 0_u16,
29690        cells_in_series: 0_u8,
29691        discharge_maximum_current: 0_u32,
29692        discharge_maximum_burst_current: 0_u32,
29693        manufacture_date: [0_u8; 11usize],
29694    };
29695    #[cfg(feature = "arbitrary")]
29696    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29697        use arbitrary::{Arbitrary, Unstructured};
29698        let mut buf = [0u8; 1024];
29699        rng.fill_bytes(&mut buf);
29700        let mut unstructured = Unstructured::new(&buf);
29701        Self::arbitrary(&mut unstructured).unwrap_or_default()
29702    }
29703}
29704impl Default for SMART_BATTERY_INFO_DATA {
29705    fn default() -> Self {
29706        Self::DEFAULT.clone()
29707    }
29708}
29709impl MessageData for SMART_BATTERY_INFO_DATA {
29710    type Message = MavMessage;
29711    const ID: u32 = 370u32;
29712    const NAME: &'static str = "SMART_BATTERY_INFO";
29713    const EXTRA_CRC: u8 = 75u8;
29714    const ENCODED_LEN: usize = 109usize;
29715    fn deser(
29716        _version: MavlinkVersion,
29717        __input: &[u8],
29718    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29719        let avail_len = __input.len();
29720        let mut payload_buf = [0; Self::ENCODED_LEN];
29721        let mut buf = if avail_len < Self::ENCODED_LEN {
29722            payload_buf[0..avail_len].copy_from_slice(__input);
29723            Bytes::new(&payload_buf)
29724        } else {
29725            Bytes::new(__input)
29726        };
29727        let mut __struct = Self::default();
29728        __struct.capacity_full_specification = buf.get_i32_le();
29729        __struct.capacity_full = buf.get_i32_le();
29730        __struct.cycle_count = buf.get_u16_le();
29731        __struct.weight = buf.get_u16_le();
29732        __struct.discharge_minimum_voltage = buf.get_u16_le();
29733        __struct.charging_minimum_voltage = buf.get_u16_le();
29734        __struct.resting_minimum_voltage = buf.get_u16_le();
29735        __struct.id = buf.get_u8();
29736        let tmp = buf.get_u8();
29737        __struct.battery_function =
29738            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29739                enum_type: "MavBatteryFunction",
29740                value: tmp as u32,
29741            })?;
29742        let tmp = buf.get_u8();
29743        __struct.mavtype =
29744            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29745                enum_type: "MavBatteryType",
29746                value: tmp as u32,
29747            })?;
29748        for v in &mut __struct.serial_number {
29749            let val = buf.get_u8();
29750            *v = val;
29751        }
29752        for v in &mut __struct.device_name {
29753            let val = buf.get_u8();
29754            *v = val;
29755        }
29756        __struct.charging_maximum_voltage = buf.get_u16_le();
29757        __struct.cells_in_series = buf.get_u8();
29758        __struct.discharge_maximum_current = buf.get_u32_le();
29759        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29760        for v in &mut __struct.manufacture_date {
29761            let val = buf.get_u8();
29762            *v = val;
29763        }
29764        Ok(__struct)
29765    }
29766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29767        let mut __tmp = BytesMut::new(bytes);
29768        #[allow(clippy::absurd_extreme_comparisons)]
29769        #[allow(unused_comparisons)]
29770        if __tmp.remaining() < Self::ENCODED_LEN {
29771            panic!(
29772                "buffer is too small (need {} bytes, but got {})",
29773                Self::ENCODED_LEN,
29774                __tmp.remaining(),
29775            )
29776        }
29777        __tmp.put_i32_le(self.capacity_full_specification);
29778        __tmp.put_i32_le(self.capacity_full);
29779        __tmp.put_u16_le(self.cycle_count);
29780        __tmp.put_u16_le(self.weight);
29781        __tmp.put_u16_le(self.discharge_minimum_voltage);
29782        __tmp.put_u16_le(self.charging_minimum_voltage);
29783        __tmp.put_u16_le(self.resting_minimum_voltage);
29784        __tmp.put_u8(self.id);
29785        __tmp.put_u8(self.battery_function as u8);
29786        __tmp.put_u8(self.mavtype as u8);
29787        for val in &self.serial_number {
29788            __tmp.put_u8(*val);
29789        }
29790        for val in &self.device_name {
29791            __tmp.put_u8(*val);
29792        }
29793        if matches!(version, MavlinkVersion::V2) {
29794            __tmp.put_u16_le(self.charging_maximum_voltage);
29795            __tmp.put_u8(self.cells_in_series);
29796            __tmp.put_u32_le(self.discharge_maximum_current);
29797            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29798            for val in &self.manufacture_date {
29799                __tmp.put_u8(*val);
29800            }
29801            let len = __tmp.len();
29802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29803        } else {
29804            __tmp.len()
29805        }
29806    }
29807}
29808#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29809#[doc = ""]
29810#[doc = "ID: 253"]
29811#[derive(Debug, Clone, PartialEq)]
29812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29814#[cfg_attr(feature = "ts", derive(TS))]
29815#[cfg_attr(feature = "ts", ts(export))]
29816pub struct STATUSTEXT_DATA {
29817    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29818    pub severity: MavSeverity,
29819    #[doc = "Status text message, without null termination character"]
29820    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29821    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29822    pub text: [u8; 50],
29823    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29824    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29825    pub id: u16,
29826    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29827    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29828    pub chunk_seq: u8,
29829}
29830impl STATUSTEXT_DATA {
29831    pub const ENCODED_LEN: usize = 54usize;
29832    pub const DEFAULT: Self = Self {
29833        severity: MavSeverity::DEFAULT,
29834        text: [0_u8; 50usize],
29835        id: 0_u16,
29836        chunk_seq: 0_u8,
29837    };
29838    #[cfg(feature = "arbitrary")]
29839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29840        use arbitrary::{Arbitrary, Unstructured};
29841        let mut buf = [0u8; 1024];
29842        rng.fill_bytes(&mut buf);
29843        let mut unstructured = Unstructured::new(&buf);
29844        Self::arbitrary(&mut unstructured).unwrap_or_default()
29845    }
29846}
29847impl Default for STATUSTEXT_DATA {
29848    fn default() -> Self {
29849        Self::DEFAULT.clone()
29850    }
29851}
29852impl MessageData for STATUSTEXT_DATA {
29853    type Message = MavMessage;
29854    const ID: u32 = 253u32;
29855    const NAME: &'static str = "STATUSTEXT";
29856    const EXTRA_CRC: u8 = 83u8;
29857    const ENCODED_LEN: usize = 54usize;
29858    fn deser(
29859        _version: MavlinkVersion,
29860        __input: &[u8],
29861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29862        let avail_len = __input.len();
29863        let mut payload_buf = [0; Self::ENCODED_LEN];
29864        let mut buf = if avail_len < Self::ENCODED_LEN {
29865            payload_buf[0..avail_len].copy_from_slice(__input);
29866            Bytes::new(&payload_buf)
29867        } else {
29868            Bytes::new(__input)
29869        };
29870        let mut __struct = Self::default();
29871        let tmp = buf.get_u8();
29872        __struct.severity =
29873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29874                enum_type: "MavSeverity",
29875                value: tmp as u32,
29876            })?;
29877        for v in &mut __struct.text {
29878            let val = buf.get_u8();
29879            *v = val;
29880        }
29881        __struct.id = buf.get_u16_le();
29882        __struct.chunk_seq = buf.get_u8();
29883        Ok(__struct)
29884    }
29885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29886        let mut __tmp = BytesMut::new(bytes);
29887        #[allow(clippy::absurd_extreme_comparisons)]
29888        #[allow(unused_comparisons)]
29889        if __tmp.remaining() < Self::ENCODED_LEN {
29890            panic!(
29891                "buffer is too small (need {} bytes, but got {})",
29892                Self::ENCODED_LEN,
29893                __tmp.remaining(),
29894            )
29895        }
29896        __tmp.put_u8(self.severity as u8);
29897        for val in &self.text {
29898            __tmp.put_u8(*val);
29899        }
29900        if matches!(version, MavlinkVersion::V2) {
29901            __tmp.put_u16_le(self.id);
29902            __tmp.put_u8(self.chunk_seq);
29903            let len = __tmp.len();
29904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29905        } else {
29906            __tmp.len()
29907        }
29908    }
29909}
29910#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29911#[doc = ""]
29912#[doc = "ID: 261"]
29913#[derive(Debug, Clone, PartialEq)]
29914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29916#[cfg_attr(feature = "ts", derive(TS))]
29917#[cfg_attr(feature = "ts", ts(export))]
29918pub struct STORAGE_INFORMATION_DATA {
29919    #[doc = "Timestamp (time since system boot)."]
29920    pub time_boot_ms: u32,
29921    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29922    pub total_capacity: f32,
29923    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29924    pub used_capacity: f32,
29925    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29926    pub available_capacity: f32,
29927    #[doc = "Read speed."]
29928    pub read_speed: f32,
29929    #[doc = "Write speed."]
29930    pub write_speed: f32,
29931    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29932    pub storage_id: u8,
29933    #[doc = "Number of storage devices"]
29934    pub storage_count: u8,
29935    #[doc = "Status of storage"]
29936    pub status: StorageStatus,
29937    #[doc = "Type of storage"]
29938    #[cfg_attr(feature = "serde", serde(default))]
29939    pub mavtype: StorageType,
29940    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29941    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29942    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29943    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29944    pub name: [u8; 32],
29945    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29946    #[cfg_attr(feature = "serde", serde(default))]
29947    pub storage_usage: StorageUsageFlag,
29948}
29949impl STORAGE_INFORMATION_DATA {
29950    pub const ENCODED_LEN: usize = 61usize;
29951    pub const DEFAULT: Self = Self {
29952        time_boot_ms: 0_u32,
29953        total_capacity: 0.0_f32,
29954        used_capacity: 0.0_f32,
29955        available_capacity: 0.0_f32,
29956        read_speed: 0.0_f32,
29957        write_speed: 0.0_f32,
29958        storage_id: 0_u8,
29959        storage_count: 0_u8,
29960        status: StorageStatus::DEFAULT,
29961        mavtype: StorageType::DEFAULT,
29962        name: [0_u8; 32usize],
29963        storage_usage: StorageUsageFlag::DEFAULT,
29964    };
29965    #[cfg(feature = "arbitrary")]
29966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29967        use arbitrary::{Arbitrary, Unstructured};
29968        let mut buf = [0u8; 1024];
29969        rng.fill_bytes(&mut buf);
29970        let mut unstructured = Unstructured::new(&buf);
29971        Self::arbitrary(&mut unstructured).unwrap_or_default()
29972    }
29973}
29974impl Default for STORAGE_INFORMATION_DATA {
29975    fn default() -> Self {
29976        Self::DEFAULT.clone()
29977    }
29978}
29979impl MessageData for STORAGE_INFORMATION_DATA {
29980    type Message = MavMessage;
29981    const ID: u32 = 261u32;
29982    const NAME: &'static str = "STORAGE_INFORMATION";
29983    const EXTRA_CRC: u8 = 179u8;
29984    const ENCODED_LEN: usize = 61usize;
29985    fn deser(
29986        _version: MavlinkVersion,
29987        __input: &[u8],
29988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29989        let avail_len = __input.len();
29990        let mut payload_buf = [0; Self::ENCODED_LEN];
29991        let mut buf = if avail_len < Self::ENCODED_LEN {
29992            payload_buf[0..avail_len].copy_from_slice(__input);
29993            Bytes::new(&payload_buf)
29994        } else {
29995            Bytes::new(__input)
29996        };
29997        let mut __struct = Self::default();
29998        __struct.time_boot_ms = buf.get_u32_le();
29999        __struct.total_capacity = buf.get_f32_le();
30000        __struct.used_capacity = buf.get_f32_le();
30001        __struct.available_capacity = buf.get_f32_le();
30002        __struct.read_speed = buf.get_f32_le();
30003        __struct.write_speed = buf.get_f32_le();
30004        __struct.storage_id = buf.get_u8();
30005        __struct.storage_count = buf.get_u8();
30006        let tmp = buf.get_u8();
30007        __struct.status =
30008            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30009                enum_type: "StorageStatus",
30010                value: tmp as u32,
30011            })?;
30012        let tmp = buf.get_u8();
30013        __struct.mavtype =
30014            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30015                enum_type: "StorageType",
30016                value: tmp as u32,
30017            })?;
30018        for v in &mut __struct.name {
30019            let val = buf.get_u8();
30020            *v = val;
30021        }
30022        let tmp = buf.get_u8();
30023        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
30024            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30025                flag_type: "StorageUsageFlag",
30026                value: tmp as u32,
30027            })?;
30028        Ok(__struct)
30029    }
30030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30031        let mut __tmp = BytesMut::new(bytes);
30032        #[allow(clippy::absurd_extreme_comparisons)]
30033        #[allow(unused_comparisons)]
30034        if __tmp.remaining() < Self::ENCODED_LEN {
30035            panic!(
30036                "buffer is too small (need {} bytes, but got {})",
30037                Self::ENCODED_LEN,
30038                __tmp.remaining(),
30039            )
30040        }
30041        __tmp.put_u32_le(self.time_boot_ms);
30042        __tmp.put_f32_le(self.total_capacity);
30043        __tmp.put_f32_le(self.used_capacity);
30044        __tmp.put_f32_le(self.available_capacity);
30045        __tmp.put_f32_le(self.read_speed);
30046        __tmp.put_f32_le(self.write_speed);
30047        __tmp.put_u8(self.storage_id);
30048        __tmp.put_u8(self.storage_count);
30049        __tmp.put_u8(self.status as u8);
30050        if matches!(version, MavlinkVersion::V2) {
30051            __tmp.put_u8(self.mavtype as u8);
30052            for val in &self.name {
30053                __tmp.put_u8(*val);
30054            }
30055            __tmp.put_u8(self.storage_usage.bits());
30056            let len = __tmp.len();
30057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30058        } else {
30059            __tmp.len()
30060        }
30061    }
30062}
30063#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
30064#[doc = ""]
30065#[doc = "ID: 401"]
30066#[derive(Debug, Clone, PartialEq)]
30067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30069#[cfg_attr(feature = "ts", derive(TS))]
30070#[cfg_attr(feature = "ts", ts(export))]
30071pub struct SUPPORTED_TUNES_DATA {
30072    #[doc = "Bitfield of supported tune formats."]
30073    pub format: TuneFormat,
30074    #[doc = "System ID"]
30075    pub target_system: u8,
30076    #[doc = "Component ID"]
30077    pub target_component: u8,
30078}
30079impl SUPPORTED_TUNES_DATA {
30080    pub const ENCODED_LEN: usize = 6usize;
30081    pub const DEFAULT: Self = Self {
30082        format: TuneFormat::DEFAULT,
30083        target_system: 0_u8,
30084        target_component: 0_u8,
30085    };
30086    #[cfg(feature = "arbitrary")]
30087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30088        use arbitrary::{Arbitrary, Unstructured};
30089        let mut buf = [0u8; 1024];
30090        rng.fill_bytes(&mut buf);
30091        let mut unstructured = Unstructured::new(&buf);
30092        Self::arbitrary(&mut unstructured).unwrap_or_default()
30093    }
30094}
30095impl Default for SUPPORTED_TUNES_DATA {
30096    fn default() -> Self {
30097        Self::DEFAULT.clone()
30098    }
30099}
30100impl MessageData for SUPPORTED_TUNES_DATA {
30101    type Message = MavMessage;
30102    const ID: u32 = 401u32;
30103    const NAME: &'static str = "SUPPORTED_TUNES";
30104    const EXTRA_CRC: u8 = 183u8;
30105    const ENCODED_LEN: usize = 6usize;
30106    fn deser(
30107        _version: MavlinkVersion,
30108        __input: &[u8],
30109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30110        let avail_len = __input.len();
30111        let mut payload_buf = [0; Self::ENCODED_LEN];
30112        let mut buf = if avail_len < Self::ENCODED_LEN {
30113            payload_buf[0..avail_len].copy_from_slice(__input);
30114            Bytes::new(&payload_buf)
30115        } else {
30116            Bytes::new(__input)
30117        };
30118        let mut __struct = Self::default();
30119        let tmp = buf.get_u32_le();
30120        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
30121            ::mavlink_core::error::ParserError::InvalidEnum {
30122                enum_type: "TuneFormat",
30123                value: tmp as u32,
30124            },
30125        )?;
30126        __struct.target_system = buf.get_u8();
30127        __struct.target_component = buf.get_u8();
30128        Ok(__struct)
30129    }
30130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30131        let mut __tmp = BytesMut::new(bytes);
30132        #[allow(clippy::absurd_extreme_comparisons)]
30133        #[allow(unused_comparisons)]
30134        if __tmp.remaining() < Self::ENCODED_LEN {
30135            panic!(
30136                "buffer is too small (need {} bytes, but got {})",
30137                Self::ENCODED_LEN,
30138                __tmp.remaining(),
30139            )
30140        }
30141        __tmp.put_u32_le(self.format as u32);
30142        __tmp.put_u8(self.target_system);
30143        __tmp.put_u8(self.target_component);
30144        if matches!(version, MavlinkVersion::V2) {
30145            let len = __tmp.len();
30146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30147        } else {
30148            __tmp.len()
30149        }
30150    }
30151}
30152#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
30153#[doc = ""]
30154#[doc = "ID: 2"]
30155#[derive(Debug, Clone, PartialEq)]
30156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30158#[cfg_attr(feature = "ts", derive(TS))]
30159#[cfg_attr(feature = "ts", ts(export))]
30160pub struct SYSTEM_TIME_DATA {
30161    #[doc = "Timestamp (UNIX epoch time)."]
30162    pub time_unix_usec: u64,
30163    #[doc = "Timestamp (time since system boot)."]
30164    pub time_boot_ms: u32,
30165}
30166impl SYSTEM_TIME_DATA {
30167    pub const ENCODED_LEN: usize = 12usize;
30168    pub const DEFAULT: Self = Self {
30169        time_unix_usec: 0_u64,
30170        time_boot_ms: 0_u32,
30171    };
30172    #[cfg(feature = "arbitrary")]
30173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30174        use arbitrary::{Arbitrary, Unstructured};
30175        let mut buf = [0u8; 1024];
30176        rng.fill_bytes(&mut buf);
30177        let mut unstructured = Unstructured::new(&buf);
30178        Self::arbitrary(&mut unstructured).unwrap_or_default()
30179    }
30180}
30181impl Default for SYSTEM_TIME_DATA {
30182    fn default() -> Self {
30183        Self::DEFAULT.clone()
30184    }
30185}
30186impl MessageData for SYSTEM_TIME_DATA {
30187    type Message = MavMessage;
30188    const ID: u32 = 2u32;
30189    const NAME: &'static str = "SYSTEM_TIME";
30190    const EXTRA_CRC: u8 = 137u8;
30191    const ENCODED_LEN: usize = 12usize;
30192    fn deser(
30193        _version: MavlinkVersion,
30194        __input: &[u8],
30195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30196        let avail_len = __input.len();
30197        let mut payload_buf = [0; Self::ENCODED_LEN];
30198        let mut buf = if avail_len < Self::ENCODED_LEN {
30199            payload_buf[0..avail_len].copy_from_slice(__input);
30200            Bytes::new(&payload_buf)
30201        } else {
30202            Bytes::new(__input)
30203        };
30204        let mut __struct = Self::default();
30205        __struct.time_unix_usec = buf.get_u64_le();
30206        __struct.time_boot_ms = buf.get_u32_le();
30207        Ok(__struct)
30208    }
30209    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30210        let mut __tmp = BytesMut::new(bytes);
30211        #[allow(clippy::absurd_extreme_comparisons)]
30212        #[allow(unused_comparisons)]
30213        if __tmp.remaining() < Self::ENCODED_LEN {
30214            panic!(
30215                "buffer is too small (need {} bytes, but got {})",
30216                Self::ENCODED_LEN,
30217                __tmp.remaining(),
30218            )
30219        }
30220        __tmp.put_u64_le(self.time_unix_usec);
30221        __tmp.put_u32_le(self.time_boot_ms);
30222        if matches!(version, MavlinkVersion::V2) {
30223            let len = __tmp.len();
30224            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30225        } else {
30226            __tmp.len()
30227        }
30228    }
30229}
30230#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
30231#[doc = ""]
30232#[doc = "ID: 1"]
30233#[derive(Debug, Clone, PartialEq)]
30234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30236#[cfg_attr(feature = "ts", derive(TS))]
30237#[cfg_attr(feature = "ts", ts(export))]
30238pub struct SYS_STATUS_DATA {
30239    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30240    pub onboard_control_sensors_present: MavSysStatusSensor,
30241    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30242    pub onboard_control_sensors_enabled: MavSysStatusSensor,
30243    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30244    pub onboard_control_sensors_health: MavSysStatusSensor,
30245    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
30246    pub load: u16,
30247    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
30248    pub voltage_battery: u16,
30249    #[doc = "Battery current, -1: Current not sent by autopilot"]
30250    pub current_battery: i16,
30251    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30252    pub drop_rate_comm: u16,
30253    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30254    pub errors_comm: u16,
30255    #[doc = "Autopilot-specific errors"]
30256    pub errors_count1: u16,
30257    #[doc = "Autopilot-specific errors"]
30258    pub errors_count2: u16,
30259    #[doc = "Autopilot-specific errors"]
30260    pub errors_count3: u16,
30261    #[doc = "Autopilot-specific errors"]
30262    pub errors_count4: u16,
30263    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
30264    pub battery_remaining: i8,
30265    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30266    #[cfg_attr(feature = "serde", serde(default))]
30267    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
30268    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30269    #[cfg_attr(feature = "serde", serde(default))]
30270    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
30271    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30272    #[cfg_attr(feature = "serde", serde(default))]
30273    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
30274}
30275impl SYS_STATUS_DATA {
30276    pub const ENCODED_LEN: usize = 43usize;
30277    pub const DEFAULT: Self = Self {
30278        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
30279        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
30280        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
30281        load: 0_u16,
30282        voltage_battery: 0_u16,
30283        current_battery: 0_i16,
30284        drop_rate_comm: 0_u16,
30285        errors_comm: 0_u16,
30286        errors_count1: 0_u16,
30287        errors_count2: 0_u16,
30288        errors_count3: 0_u16,
30289        errors_count4: 0_u16,
30290        battery_remaining: 0_i8,
30291        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
30292        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
30293        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
30294    };
30295    #[cfg(feature = "arbitrary")]
30296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30297        use arbitrary::{Arbitrary, Unstructured};
30298        let mut buf = [0u8; 1024];
30299        rng.fill_bytes(&mut buf);
30300        let mut unstructured = Unstructured::new(&buf);
30301        Self::arbitrary(&mut unstructured).unwrap_or_default()
30302    }
30303}
30304impl Default for SYS_STATUS_DATA {
30305    fn default() -> Self {
30306        Self::DEFAULT.clone()
30307    }
30308}
30309impl MessageData for SYS_STATUS_DATA {
30310    type Message = MavMessage;
30311    const ID: u32 = 1u32;
30312    const NAME: &'static str = "SYS_STATUS";
30313    const EXTRA_CRC: u8 = 124u8;
30314    const ENCODED_LEN: usize = 43usize;
30315    fn deser(
30316        _version: MavlinkVersion,
30317        __input: &[u8],
30318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30319        let avail_len = __input.len();
30320        let mut payload_buf = [0; Self::ENCODED_LEN];
30321        let mut buf = if avail_len < Self::ENCODED_LEN {
30322            payload_buf[0..avail_len].copy_from_slice(__input);
30323            Bytes::new(&payload_buf)
30324        } else {
30325            Bytes::new(__input)
30326        };
30327        let mut __struct = Self::default();
30328        let tmp = buf.get_u32_le();
30329        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
30330            tmp & MavSysStatusSensor::all().bits(),
30331        )
30332        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30333            flag_type: "MavSysStatusSensor",
30334            value: tmp as u32,
30335        })?;
30336        let tmp = buf.get_u32_le();
30337        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
30338            tmp & MavSysStatusSensor::all().bits(),
30339        )
30340        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30341            flag_type: "MavSysStatusSensor",
30342            value: tmp as u32,
30343        })?;
30344        let tmp = buf.get_u32_le();
30345        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
30346            tmp & MavSysStatusSensor::all().bits(),
30347        )
30348        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30349            flag_type: "MavSysStatusSensor",
30350            value: tmp as u32,
30351        })?;
30352        __struct.load = buf.get_u16_le();
30353        __struct.voltage_battery = buf.get_u16_le();
30354        __struct.current_battery = buf.get_i16_le();
30355        __struct.drop_rate_comm = buf.get_u16_le();
30356        __struct.errors_comm = buf.get_u16_le();
30357        __struct.errors_count1 = buf.get_u16_le();
30358        __struct.errors_count2 = buf.get_u16_le();
30359        __struct.errors_count3 = buf.get_u16_le();
30360        __struct.errors_count4 = buf.get_u16_le();
30361        __struct.battery_remaining = buf.get_i8();
30362        let tmp = buf.get_u32_le();
30363        __struct.onboard_control_sensors_present_extended =
30364            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30365                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30366                flag_type: "MavSysStatusSensorExtended",
30367                value: tmp as u32,
30368            })?;
30369        let tmp = buf.get_u32_le();
30370        __struct.onboard_control_sensors_enabled_extended =
30371            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30372                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30373                flag_type: "MavSysStatusSensorExtended",
30374                value: tmp as u32,
30375            })?;
30376        let tmp = buf.get_u32_le();
30377        __struct.onboard_control_sensors_health_extended =
30378            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30379                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30380                flag_type: "MavSysStatusSensorExtended",
30381                value: tmp as u32,
30382            })?;
30383        Ok(__struct)
30384    }
30385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30386        let mut __tmp = BytesMut::new(bytes);
30387        #[allow(clippy::absurd_extreme_comparisons)]
30388        #[allow(unused_comparisons)]
30389        if __tmp.remaining() < Self::ENCODED_LEN {
30390            panic!(
30391                "buffer is too small (need {} bytes, but got {})",
30392                Self::ENCODED_LEN,
30393                __tmp.remaining(),
30394            )
30395        }
30396        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
30397        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
30398        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
30399        __tmp.put_u16_le(self.load);
30400        __tmp.put_u16_le(self.voltage_battery);
30401        __tmp.put_i16_le(self.current_battery);
30402        __tmp.put_u16_le(self.drop_rate_comm);
30403        __tmp.put_u16_le(self.errors_comm);
30404        __tmp.put_u16_le(self.errors_count1);
30405        __tmp.put_u16_le(self.errors_count2);
30406        __tmp.put_u16_le(self.errors_count3);
30407        __tmp.put_u16_le(self.errors_count4);
30408        __tmp.put_i8(self.battery_remaining);
30409        if matches!(version, MavlinkVersion::V2) {
30410            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
30411            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
30412            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
30413            let len = __tmp.len();
30414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30415        } else {
30416            __tmp.len()
30417        }
30418    }
30419}
30420#[doc = "Current motion information from sensors on a target."]
30421#[doc = ""]
30422#[doc = "ID: 510"]
30423#[derive(Debug, Clone, PartialEq)]
30424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30426#[cfg_attr(feature = "ts", derive(TS))]
30427#[cfg_attr(feature = "ts", ts(export))]
30428pub struct TARGET_ABSOLUTE_DATA {
30429    #[doc = "Timestamp (UNIX epoch time)."]
30430    pub timestamp: u64,
30431    #[doc = "Target's latitude (WGS84)"]
30432    pub lat: i32,
30433    #[doc = "Target's longitude (WGS84)"]
30434    pub lon: i32,
30435    #[doc = "Target's altitude (AMSL)"]
30436    pub alt: f32,
30437    #[doc = "Target's velocity in its body frame"]
30438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30439    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30440    pub vel: [f32; 3],
30441    #[doc = "Linear target's acceleration in its body frame"]
30442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30443    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30444    pub acc: [f32; 3],
30445    #[doc = "Quaternion of the target's orientation from its body frame to the vehicle's NED frame."]
30446    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30447    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30448    pub q_target: [f32; 4],
30449    #[doc = "Target's roll, pitch and yaw rates"]
30450    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30451    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30452    pub rates: [f32; 3],
30453    #[doc = "Standard deviation of horizontal (eph) and vertical (epv) position errors"]
30454    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30455    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30456    pub position_std: [f32; 2],
30457    #[doc = "Standard deviation of the target's velocity in its body frame"]
30458    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30459    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30460    pub vel_std: [f32; 3],
30461    #[doc = "Standard deviation of the target's acceleration in its body frame"]
30462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30463    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30464    pub acc_std: [f32; 3],
30465    #[doc = "The ID of the target if multiple targets are present"]
30466    pub id: u8,
30467    #[doc = "Bitmap to indicate the sensor's reporting capabilities"]
30468    pub sensor_capabilities: TargetAbsoluteSensorCapabilityFlags,
30469}
30470impl TARGET_ABSOLUTE_DATA {
30471    pub const ENCODED_LEN: usize = 106usize;
30472    pub const DEFAULT: Self = Self {
30473        timestamp: 0_u64,
30474        lat: 0_i32,
30475        lon: 0_i32,
30476        alt: 0.0_f32,
30477        vel: [0.0_f32; 3usize],
30478        acc: [0.0_f32; 3usize],
30479        q_target: [0.0_f32; 4usize],
30480        rates: [0.0_f32; 3usize],
30481        position_std: [0.0_f32; 2usize],
30482        vel_std: [0.0_f32; 3usize],
30483        acc_std: [0.0_f32; 3usize],
30484        id: 0_u8,
30485        sensor_capabilities: TargetAbsoluteSensorCapabilityFlags::DEFAULT,
30486    };
30487    #[cfg(feature = "arbitrary")]
30488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30489        use arbitrary::{Arbitrary, Unstructured};
30490        let mut buf = [0u8; 1024];
30491        rng.fill_bytes(&mut buf);
30492        let mut unstructured = Unstructured::new(&buf);
30493        Self::arbitrary(&mut unstructured).unwrap_or_default()
30494    }
30495}
30496impl Default for TARGET_ABSOLUTE_DATA {
30497    fn default() -> Self {
30498        Self::DEFAULT.clone()
30499    }
30500}
30501impl MessageData for TARGET_ABSOLUTE_DATA {
30502    type Message = MavMessage;
30503    const ID: u32 = 510u32;
30504    const NAME: &'static str = "TARGET_ABSOLUTE";
30505    const EXTRA_CRC: u8 = 245u8;
30506    const ENCODED_LEN: usize = 106usize;
30507    fn deser(
30508        _version: MavlinkVersion,
30509        __input: &[u8],
30510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30511        let avail_len = __input.len();
30512        let mut payload_buf = [0; Self::ENCODED_LEN];
30513        let mut buf = if avail_len < Self::ENCODED_LEN {
30514            payload_buf[0..avail_len].copy_from_slice(__input);
30515            Bytes::new(&payload_buf)
30516        } else {
30517            Bytes::new(__input)
30518        };
30519        let mut __struct = Self::default();
30520        __struct.timestamp = buf.get_u64_le();
30521        __struct.lat = buf.get_i32_le();
30522        __struct.lon = buf.get_i32_le();
30523        __struct.alt = buf.get_f32_le();
30524        for v in &mut __struct.vel {
30525            let val = buf.get_f32_le();
30526            *v = val;
30527        }
30528        for v in &mut __struct.acc {
30529            let val = buf.get_f32_le();
30530            *v = val;
30531        }
30532        for v in &mut __struct.q_target {
30533            let val = buf.get_f32_le();
30534            *v = val;
30535        }
30536        for v in &mut __struct.rates {
30537            let val = buf.get_f32_le();
30538            *v = val;
30539        }
30540        for v in &mut __struct.position_std {
30541            let val = buf.get_f32_le();
30542            *v = val;
30543        }
30544        for v in &mut __struct.vel_std {
30545            let val = buf.get_f32_le();
30546            *v = val;
30547        }
30548        for v in &mut __struct.acc_std {
30549            let val = buf.get_f32_le();
30550            *v = val;
30551        }
30552        __struct.id = buf.get_u8();
30553        let tmp = buf.get_u8();
30554        __struct.sensor_capabilities = TargetAbsoluteSensorCapabilityFlags::from_bits(
30555            tmp & TargetAbsoluteSensorCapabilityFlags::all().bits(),
30556        )
30557        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30558            flag_type: "TargetAbsoluteSensorCapabilityFlags",
30559            value: tmp as u32,
30560        })?;
30561        Ok(__struct)
30562    }
30563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30564        let mut __tmp = BytesMut::new(bytes);
30565        #[allow(clippy::absurd_extreme_comparisons)]
30566        #[allow(unused_comparisons)]
30567        if __tmp.remaining() < Self::ENCODED_LEN {
30568            panic!(
30569                "buffer is too small (need {} bytes, but got {})",
30570                Self::ENCODED_LEN,
30571                __tmp.remaining(),
30572            )
30573        }
30574        __tmp.put_u64_le(self.timestamp);
30575        __tmp.put_i32_le(self.lat);
30576        __tmp.put_i32_le(self.lon);
30577        __tmp.put_f32_le(self.alt);
30578        for val in &self.vel {
30579            __tmp.put_f32_le(*val);
30580        }
30581        for val in &self.acc {
30582            __tmp.put_f32_le(*val);
30583        }
30584        for val in &self.q_target {
30585            __tmp.put_f32_le(*val);
30586        }
30587        for val in &self.rates {
30588            __tmp.put_f32_le(*val);
30589        }
30590        for val in &self.position_std {
30591            __tmp.put_f32_le(*val);
30592        }
30593        for val in &self.vel_std {
30594            __tmp.put_f32_le(*val);
30595        }
30596        for val in &self.acc_std {
30597            __tmp.put_f32_le(*val);
30598        }
30599        __tmp.put_u8(self.id);
30600        __tmp.put_u8(self.sensor_capabilities.bits());
30601        if matches!(version, MavlinkVersion::V2) {
30602            let len = __tmp.len();
30603            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30604        } else {
30605            __tmp.len()
30606        }
30607    }
30608}
30609#[doc = "The location of a target measured by MAV's onboard sensors."]
30610#[doc = ""]
30611#[doc = "ID: 511"]
30612#[derive(Debug, Clone, PartialEq)]
30613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30615#[cfg_attr(feature = "ts", derive(TS))]
30616#[cfg_attr(feature = "ts", ts(export))]
30617pub struct TARGET_RELATIVE_DATA {
30618    #[doc = "Timestamp (UNIX epoch time)"]
30619    pub timestamp: u64,
30620    #[doc = "X Position of the target in TARGET_OBS_FRAME"]
30621    pub x: f32,
30622    #[doc = "Y Position of the target in TARGET_OBS_FRAME"]
30623    pub y: f32,
30624    #[doc = "Z Position of the target in TARGET_OBS_FRAME"]
30625    pub z: f32,
30626    #[doc = "Standard deviation of the target's position in TARGET_OBS_FRAME"]
30627    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30628    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30629    pub pos_std: [f32; 3],
30630    #[doc = "Standard deviation of the target's orientation in TARGET_OBS_FRAME"]
30631    pub yaw_std: f32,
30632    #[doc = "Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
30633    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30634    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30635    pub q_target: [f32; 4],
30636    #[doc = "Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
30637    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30638    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30639    pub q_sensor: [f32; 4],
30640    #[doc = "The ID of the target if multiple targets are present"]
30641    pub id: u8,
30642    #[doc = "Coordinate frame used for following fields."]
30643    pub frame: TargetObsFrame,
30644    #[doc = "Type of target"]
30645    pub mavtype: LandingTargetType,
30646}
30647impl TARGET_RELATIVE_DATA {
30648    pub const ENCODED_LEN: usize = 71usize;
30649    pub const DEFAULT: Self = Self {
30650        timestamp: 0_u64,
30651        x: 0.0_f32,
30652        y: 0.0_f32,
30653        z: 0.0_f32,
30654        pos_std: [0.0_f32; 3usize],
30655        yaw_std: 0.0_f32,
30656        q_target: [0.0_f32; 4usize],
30657        q_sensor: [0.0_f32; 4usize],
30658        id: 0_u8,
30659        frame: TargetObsFrame::DEFAULT,
30660        mavtype: LandingTargetType::DEFAULT,
30661    };
30662    #[cfg(feature = "arbitrary")]
30663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30664        use arbitrary::{Arbitrary, Unstructured};
30665        let mut buf = [0u8; 1024];
30666        rng.fill_bytes(&mut buf);
30667        let mut unstructured = Unstructured::new(&buf);
30668        Self::arbitrary(&mut unstructured).unwrap_or_default()
30669    }
30670}
30671impl Default for TARGET_RELATIVE_DATA {
30672    fn default() -> Self {
30673        Self::DEFAULT.clone()
30674    }
30675}
30676impl MessageData for TARGET_RELATIVE_DATA {
30677    type Message = MavMessage;
30678    const ID: u32 = 511u32;
30679    const NAME: &'static str = "TARGET_RELATIVE";
30680    const EXTRA_CRC: u8 = 28u8;
30681    const ENCODED_LEN: usize = 71usize;
30682    fn deser(
30683        _version: MavlinkVersion,
30684        __input: &[u8],
30685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30686        let avail_len = __input.len();
30687        let mut payload_buf = [0; Self::ENCODED_LEN];
30688        let mut buf = if avail_len < Self::ENCODED_LEN {
30689            payload_buf[0..avail_len].copy_from_slice(__input);
30690            Bytes::new(&payload_buf)
30691        } else {
30692            Bytes::new(__input)
30693        };
30694        let mut __struct = Self::default();
30695        __struct.timestamp = buf.get_u64_le();
30696        __struct.x = buf.get_f32_le();
30697        __struct.y = buf.get_f32_le();
30698        __struct.z = buf.get_f32_le();
30699        for v in &mut __struct.pos_std {
30700            let val = buf.get_f32_le();
30701            *v = val;
30702        }
30703        __struct.yaw_std = buf.get_f32_le();
30704        for v in &mut __struct.q_target {
30705            let val = buf.get_f32_le();
30706            *v = val;
30707        }
30708        for v in &mut __struct.q_sensor {
30709            let val = buf.get_f32_le();
30710            *v = val;
30711        }
30712        __struct.id = buf.get_u8();
30713        let tmp = buf.get_u8();
30714        __struct.frame =
30715            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30716                enum_type: "TargetObsFrame",
30717                value: tmp as u32,
30718            })?;
30719        let tmp = buf.get_u8();
30720        __struct.mavtype =
30721            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30722                enum_type: "LandingTargetType",
30723                value: tmp as u32,
30724            })?;
30725        Ok(__struct)
30726    }
30727    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30728        let mut __tmp = BytesMut::new(bytes);
30729        #[allow(clippy::absurd_extreme_comparisons)]
30730        #[allow(unused_comparisons)]
30731        if __tmp.remaining() < Self::ENCODED_LEN {
30732            panic!(
30733                "buffer is too small (need {} bytes, but got {})",
30734                Self::ENCODED_LEN,
30735                __tmp.remaining(),
30736            )
30737        }
30738        __tmp.put_u64_le(self.timestamp);
30739        __tmp.put_f32_le(self.x);
30740        __tmp.put_f32_le(self.y);
30741        __tmp.put_f32_le(self.z);
30742        for val in &self.pos_std {
30743            __tmp.put_f32_le(*val);
30744        }
30745        __tmp.put_f32_le(self.yaw_std);
30746        for val in &self.q_target {
30747            __tmp.put_f32_le(*val);
30748        }
30749        for val in &self.q_sensor {
30750            __tmp.put_f32_le(*val);
30751        }
30752        __tmp.put_u8(self.id);
30753        __tmp.put_u8(self.frame as u8);
30754        __tmp.put_u8(self.mavtype as u8);
30755        if matches!(version, MavlinkVersion::V2) {
30756            let len = __tmp.len();
30757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30758        } else {
30759            __tmp.len()
30760        }
30761    }
30762}
30763#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
30764#[doc = ""]
30765#[doc = "ID: 135"]
30766#[derive(Debug, Clone, PartialEq)]
30767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30769#[cfg_attr(feature = "ts", derive(TS))]
30770#[cfg_attr(feature = "ts", ts(export))]
30771pub struct TERRAIN_CHECK_DATA {
30772    #[doc = "Latitude"]
30773    pub lat: i32,
30774    #[doc = "Longitude"]
30775    pub lon: i32,
30776}
30777impl TERRAIN_CHECK_DATA {
30778    pub const ENCODED_LEN: usize = 8usize;
30779    pub const DEFAULT: Self = Self {
30780        lat: 0_i32,
30781        lon: 0_i32,
30782    };
30783    #[cfg(feature = "arbitrary")]
30784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30785        use arbitrary::{Arbitrary, Unstructured};
30786        let mut buf = [0u8; 1024];
30787        rng.fill_bytes(&mut buf);
30788        let mut unstructured = Unstructured::new(&buf);
30789        Self::arbitrary(&mut unstructured).unwrap_or_default()
30790    }
30791}
30792impl Default for TERRAIN_CHECK_DATA {
30793    fn default() -> Self {
30794        Self::DEFAULT.clone()
30795    }
30796}
30797impl MessageData for TERRAIN_CHECK_DATA {
30798    type Message = MavMessage;
30799    const ID: u32 = 135u32;
30800    const NAME: &'static str = "TERRAIN_CHECK";
30801    const EXTRA_CRC: u8 = 203u8;
30802    const ENCODED_LEN: usize = 8usize;
30803    fn deser(
30804        _version: MavlinkVersion,
30805        __input: &[u8],
30806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30807        let avail_len = __input.len();
30808        let mut payload_buf = [0; Self::ENCODED_LEN];
30809        let mut buf = if avail_len < Self::ENCODED_LEN {
30810            payload_buf[0..avail_len].copy_from_slice(__input);
30811            Bytes::new(&payload_buf)
30812        } else {
30813            Bytes::new(__input)
30814        };
30815        let mut __struct = Self::default();
30816        __struct.lat = buf.get_i32_le();
30817        __struct.lon = buf.get_i32_le();
30818        Ok(__struct)
30819    }
30820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30821        let mut __tmp = BytesMut::new(bytes);
30822        #[allow(clippy::absurd_extreme_comparisons)]
30823        #[allow(unused_comparisons)]
30824        if __tmp.remaining() < Self::ENCODED_LEN {
30825            panic!(
30826                "buffer is too small (need {} bytes, but got {})",
30827                Self::ENCODED_LEN,
30828                __tmp.remaining(),
30829            )
30830        }
30831        __tmp.put_i32_le(self.lat);
30832        __tmp.put_i32_le(self.lon);
30833        if matches!(version, MavlinkVersion::V2) {
30834            let len = __tmp.len();
30835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30836        } else {
30837            __tmp.len()
30838        }
30839    }
30840}
30841#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30842#[doc = ""]
30843#[doc = "ID: 134"]
30844#[derive(Debug, Clone, PartialEq)]
30845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30847#[cfg_attr(feature = "ts", derive(TS))]
30848#[cfg_attr(feature = "ts", ts(export))]
30849pub struct TERRAIN_DATA_DATA {
30850    #[doc = "Latitude of SW corner of first grid"]
30851    pub lat: i32,
30852    #[doc = "Longitude of SW corner of first grid"]
30853    pub lon: i32,
30854    #[doc = "Grid spacing"]
30855    pub grid_spacing: u16,
30856    #[doc = "Terrain data MSL"]
30857    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30858    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30859    pub data: [i16; 16],
30860    #[doc = "bit within the terrain request mask"]
30861    pub gridbit: u8,
30862}
30863impl TERRAIN_DATA_DATA {
30864    pub const ENCODED_LEN: usize = 43usize;
30865    pub const DEFAULT: Self = Self {
30866        lat: 0_i32,
30867        lon: 0_i32,
30868        grid_spacing: 0_u16,
30869        data: [0_i16; 16usize],
30870        gridbit: 0_u8,
30871    };
30872    #[cfg(feature = "arbitrary")]
30873    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30874        use arbitrary::{Arbitrary, Unstructured};
30875        let mut buf = [0u8; 1024];
30876        rng.fill_bytes(&mut buf);
30877        let mut unstructured = Unstructured::new(&buf);
30878        Self::arbitrary(&mut unstructured).unwrap_or_default()
30879    }
30880}
30881impl Default for TERRAIN_DATA_DATA {
30882    fn default() -> Self {
30883        Self::DEFAULT.clone()
30884    }
30885}
30886impl MessageData for TERRAIN_DATA_DATA {
30887    type Message = MavMessage;
30888    const ID: u32 = 134u32;
30889    const NAME: &'static str = "TERRAIN_DATA";
30890    const EXTRA_CRC: u8 = 229u8;
30891    const ENCODED_LEN: usize = 43usize;
30892    fn deser(
30893        _version: MavlinkVersion,
30894        __input: &[u8],
30895    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30896        let avail_len = __input.len();
30897        let mut payload_buf = [0; Self::ENCODED_LEN];
30898        let mut buf = if avail_len < Self::ENCODED_LEN {
30899            payload_buf[0..avail_len].copy_from_slice(__input);
30900            Bytes::new(&payload_buf)
30901        } else {
30902            Bytes::new(__input)
30903        };
30904        let mut __struct = Self::default();
30905        __struct.lat = buf.get_i32_le();
30906        __struct.lon = buf.get_i32_le();
30907        __struct.grid_spacing = buf.get_u16_le();
30908        for v in &mut __struct.data {
30909            let val = buf.get_i16_le();
30910            *v = val;
30911        }
30912        __struct.gridbit = buf.get_u8();
30913        Ok(__struct)
30914    }
30915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30916        let mut __tmp = BytesMut::new(bytes);
30917        #[allow(clippy::absurd_extreme_comparisons)]
30918        #[allow(unused_comparisons)]
30919        if __tmp.remaining() < Self::ENCODED_LEN {
30920            panic!(
30921                "buffer is too small (need {} bytes, but got {})",
30922                Self::ENCODED_LEN,
30923                __tmp.remaining(),
30924            )
30925        }
30926        __tmp.put_i32_le(self.lat);
30927        __tmp.put_i32_le(self.lon);
30928        __tmp.put_u16_le(self.grid_spacing);
30929        for val in &self.data {
30930            __tmp.put_i16_le(*val);
30931        }
30932        __tmp.put_u8(self.gridbit);
30933        if matches!(version, MavlinkVersion::V2) {
30934            let len = __tmp.len();
30935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30936        } else {
30937            __tmp.len()
30938        }
30939    }
30940}
30941#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30942#[doc = ""]
30943#[doc = "ID: 136"]
30944#[derive(Debug, Clone, PartialEq)]
30945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30947#[cfg_attr(feature = "ts", derive(TS))]
30948#[cfg_attr(feature = "ts", ts(export))]
30949pub struct TERRAIN_REPORT_DATA {
30950    #[doc = "Latitude"]
30951    pub lat: i32,
30952    #[doc = "Longitude"]
30953    pub lon: i32,
30954    #[doc = "Terrain height MSL"]
30955    pub terrain_height: f32,
30956    #[doc = "Current vehicle height above lat/lon terrain height"]
30957    pub current_height: f32,
30958    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
30959    pub spacing: u16,
30960    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
30961    pub pending: u16,
30962    #[doc = "Number of 4x4 terrain blocks in memory"]
30963    pub loaded: u16,
30964}
30965impl TERRAIN_REPORT_DATA {
30966    pub const ENCODED_LEN: usize = 22usize;
30967    pub const DEFAULT: Self = Self {
30968        lat: 0_i32,
30969        lon: 0_i32,
30970        terrain_height: 0.0_f32,
30971        current_height: 0.0_f32,
30972        spacing: 0_u16,
30973        pending: 0_u16,
30974        loaded: 0_u16,
30975    };
30976    #[cfg(feature = "arbitrary")]
30977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30978        use arbitrary::{Arbitrary, Unstructured};
30979        let mut buf = [0u8; 1024];
30980        rng.fill_bytes(&mut buf);
30981        let mut unstructured = Unstructured::new(&buf);
30982        Self::arbitrary(&mut unstructured).unwrap_or_default()
30983    }
30984}
30985impl Default for TERRAIN_REPORT_DATA {
30986    fn default() -> Self {
30987        Self::DEFAULT.clone()
30988    }
30989}
30990impl MessageData for TERRAIN_REPORT_DATA {
30991    type Message = MavMessage;
30992    const ID: u32 = 136u32;
30993    const NAME: &'static str = "TERRAIN_REPORT";
30994    const EXTRA_CRC: u8 = 1u8;
30995    const ENCODED_LEN: usize = 22usize;
30996    fn deser(
30997        _version: MavlinkVersion,
30998        __input: &[u8],
30999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31000        let avail_len = __input.len();
31001        let mut payload_buf = [0; Self::ENCODED_LEN];
31002        let mut buf = if avail_len < Self::ENCODED_LEN {
31003            payload_buf[0..avail_len].copy_from_slice(__input);
31004            Bytes::new(&payload_buf)
31005        } else {
31006            Bytes::new(__input)
31007        };
31008        let mut __struct = Self::default();
31009        __struct.lat = buf.get_i32_le();
31010        __struct.lon = buf.get_i32_le();
31011        __struct.terrain_height = buf.get_f32_le();
31012        __struct.current_height = buf.get_f32_le();
31013        __struct.spacing = buf.get_u16_le();
31014        __struct.pending = buf.get_u16_le();
31015        __struct.loaded = buf.get_u16_le();
31016        Ok(__struct)
31017    }
31018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31019        let mut __tmp = BytesMut::new(bytes);
31020        #[allow(clippy::absurd_extreme_comparisons)]
31021        #[allow(unused_comparisons)]
31022        if __tmp.remaining() < Self::ENCODED_LEN {
31023            panic!(
31024                "buffer is too small (need {} bytes, but got {})",
31025                Self::ENCODED_LEN,
31026                __tmp.remaining(),
31027            )
31028        }
31029        __tmp.put_i32_le(self.lat);
31030        __tmp.put_i32_le(self.lon);
31031        __tmp.put_f32_le(self.terrain_height);
31032        __tmp.put_f32_le(self.current_height);
31033        __tmp.put_u16_le(self.spacing);
31034        __tmp.put_u16_le(self.pending);
31035        __tmp.put_u16_le(self.loaded);
31036        if matches!(version, MavlinkVersion::V2) {
31037            let len = __tmp.len();
31038            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31039        } else {
31040            __tmp.len()
31041        }
31042    }
31043}
31044#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31045#[doc = ""]
31046#[doc = "ID: 133"]
31047#[derive(Debug, Clone, PartialEq)]
31048#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31050#[cfg_attr(feature = "ts", derive(TS))]
31051#[cfg_attr(feature = "ts", ts(export))]
31052pub struct TERRAIN_REQUEST_DATA {
31053    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31054    pub mask: u64,
31055    #[doc = "Latitude of SW corner of first grid"]
31056    pub lat: i32,
31057    #[doc = "Longitude of SW corner of first grid"]
31058    pub lon: i32,
31059    #[doc = "Grid spacing"]
31060    pub grid_spacing: u16,
31061}
31062impl TERRAIN_REQUEST_DATA {
31063    pub const ENCODED_LEN: usize = 18usize;
31064    pub const DEFAULT: Self = Self {
31065        mask: 0_u64,
31066        lat: 0_i32,
31067        lon: 0_i32,
31068        grid_spacing: 0_u16,
31069    };
31070    #[cfg(feature = "arbitrary")]
31071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31072        use arbitrary::{Arbitrary, Unstructured};
31073        let mut buf = [0u8; 1024];
31074        rng.fill_bytes(&mut buf);
31075        let mut unstructured = Unstructured::new(&buf);
31076        Self::arbitrary(&mut unstructured).unwrap_or_default()
31077    }
31078}
31079impl Default for TERRAIN_REQUEST_DATA {
31080    fn default() -> Self {
31081        Self::DEFAULT.clone()
31082    }
31083}
31084impl MessageData for TERRAIN_REQUEST_DATA {
31085    type Message = MavMessage;
31086    const ID: u32 = 133u32;
31087    const NAME: &'static str = "TERRAIN_REQUEST";
31088    const EXTRA_CRC: u8 = 6u8;
31089    const ENCODED_LEN: usize = 18usize;
31090    fn deser(
31091        _version: MavlinkVersion,
31092        __input: &[u8],
31093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31094        let avail_len = __input.len();
31095        let mut payload_buf = [0; Self::ENCODED_LEN];
31096        let mut buf = if avail_len < Self::ENCODED_LEN {
31097            payload_buf[0..avail_len].copy_from_slice(__input);
31098            Bytes::new(&payload_buf)
31099        } else {
31100            Bytes::new(__input)
31101        };
31102        let mut __struct = Self::default();
31103        __struct.mask = buf.get_u64_le();
31104        __struct.lat = buf.get_i32_le();
31105        __struct.lon = buf.get_i32_le();
31106        __struct.grid_spacing = buf.get_u16_le();
31107        Ok(__struct)
31108    }
31109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31110        let mut __tmp = BytesMut::new(bytes);
31111        #[allow(clippy::absurd_extreme_comparisons)]
31112        #[allow(unused_comparisons)]
31113        if __tmp.remaining() < Self::ENCODED_LEN {
31114            panic!(
31115                "buffer is too small (need {} bytes, but got {})",
31116                Self::ENCODED_LEN,
31117                __tmp.remaining(),
31118            )
31119        }
31120        __tmp.put_u64_le(self.mask);
31121        __tmp.put_i32_le(self.lat);
31122        __tmp.put_i32_le(self.lon);
31123        __tmp.put_u16_le(self.grid_spacing);
31124        if matches!(version, MavlinkVersion::V2) {
31125            let len = __tmp.len();
31126            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31127        } else {
31128            __tmp.len()
31129        }
31130    }
31131}
31132#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31133#[doc = ""]
31134#[doc = "ID: 111"]
31135#[derive(Debug, Clone, PartialEq)]
31136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31138#[cfg_attr(feature = "ts", derive(TS))]
31139#[cfg_attr(feature = "ts", ts(export))]
31140pub struct TIMESYNC_DATA {
31141    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31142    pub tc1: i64,
31143    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31144    pub ts1: i64,
31145    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31146    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31147    pub target_system: u8,
31148    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31149    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31150    pub target_component: u8,
31151}
31152impl TIMESYNC_DATA {
31153    pub const ENCODED_LEN: usize = 18usize;
31154    pub const DEFAULT: Self = Self {
31155        tc1: 0_i64,
31156        ts1: 0_i64,
31157        target_system: 0_u8,
31158        target_component: 0_u8,
31159    };
31160    #[cfg(feature = "arbitrary")]
31161    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31162        use arbitrary::{Arbitrary, Unstructured};
31163        let mut buf = [0u8; 1024];
31164        rng.fill_bytes(&mut buf);
31165        let mut unstructured = Unstructured::new(&buf);
31166        Self::arbitrary(&mut unstructured).unwrap_or_default()
31167    }
31168}
31169impl Default for TIMESYNC_DATA {
31170    fn default() -> Self {
31171        Self::DEFAULT.clone()
31172    }
31173}
31174impl MessageData for TIMESYNC_DATA {
31175    type Message = MavMessage;
31176    const ID: u32 = 111u32;
31177    const NAME: &'static str = "TIMESYNC";
31178    const EXTRA_CRC: u8 = 34u8;
31179    const ENCODED_LEN: usize = 18usize;
31180    fn deser(
31181        _version: MavlinkVersion,
31182        __input: &[u8],
31183    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31184        let avail_len = __input.len();
31185        let mut payload_buf = [0; Self::ENCODED_LEN];
31186        let mut buf = if avail_len < Self::ENCODED_LEN {
31187            payload_buf[0..avail_len].copy_from_slice(__input);
31188            Bytes::new(&payload_buf)
31189        } else {
31190            Bytes::new(__input)
31191        };
31192        let mut __struct = Self::default();
31193        __struct.tc1 = buf.get_i64_le();
31194        __struct.ts1 = buf.get_i64_le();
31195        __struct.target_system = buf.get_u8();
31196        __struct.target_component = buf.get_u8();
31197        Ok(__struct)
31198    }
31199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31200        let mut __tmp = BytesMut::new(bytes);
31201        #[allow(clippy::absurd_extreme_comparisons)]
31202        #[allow(unused_comparisons)]
31203        if __tmp.remaining() < Self::ENCODED_LEN {
31204            panic!(
31205                "buffer is too small (need {} bytes, but got {})",
31206                Self::ENCODED_LEN,
31207                __tmp.remaining(),
31208            )
31209        }
31210        __tmp.put_i64_le(self.tc1);
31211        __tmp.put_i64_le(self.ts1);
31212        if matches!(version, MavlinkVersion::V2) {
31213            __tmp.put_u8(self.target_system);
31214            __tmp.put_u8(self.target_component);
31215            let len = __tmp.len();
31216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31217        } else {
31218            __tmp.len()
31219        }
31220    }
31221}
31222#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31223#[doc = ""]
31224#[doc = "ID: 380"]
31225#[derive(Debug, Clone, PartialEq)]
31226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31228#[cfg_attr(feature = "ts", derive(TS))]
31229#[cfg_attr(feature = "ts", ts(export))]
31230pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31231    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31232    pub safe_return: i32,
31233    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31234    pub land: i32,
31235    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31236    pub mission_next_item: i32,
31237    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31238    pub mission_end: i32,
31239    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31240    pub commanded_action: i32,
31241}
31242impl TIME_ESTIMATE_TO_TARGET_DATA {
31243    pub const ENCODED_LEN: usize = 20usize;
31244    pub const DEFAULT: Self = Self {
31245        safe_return: 0_i32,
31246        land: 0_i32,
31247        mission_next_item: 0_i32,
31248        mission_end: 0_i32,
31249        commanded_action: 0_i32,
31250    };
31251    #[cfg(feature = "arbitrary")]
31252    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31253        use arbitrary::{Arbitrary, Unstructured};
31254        let mut buf = [0u8; 1024];
31255        rng.fill_bytes(&mut buf);
31256        let mut unstructured = Unstructured::new(&buf);
31257        Self::arbitrary(&mut unstructured).unwrap_or_default()
31258    }
31259}
31260impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31261    fn default() -> Self {
31262        Self::DEFAULT.clone()
31263    }
31264}
31265impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31266    type Message = MavMessage;
31267    const ID: u32 = 380u32;
31268    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31269    const EXTRA_CRC: u8 = 232u8;
31270    const ENCODED_LEN: usize = 20usize;
31271    fn deser(
31272        _version: MavlinkVersion,
31273        __input: &[u8],
31274    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31275        let avail_len = __input.len();
31276        let mut payload_buf = [0; Self::ENCODED_LEN];
31277        let mut buf = if avail_len < Self::ENCODED_LEN {
31278            payload_buf[0..avail_len].copy_from_slice(__input);
31279            Bytes::new(&payload_buf)
31280        } else {
31281            Bytes::new(__input)
31282        };
31283        let mut __struct = Self::default();
31284        __struct.safe_return = buf.get_i32_le();
31285        __struct.land = buf.get_i32_le();
31286        __struct.mission_next_item = buf.get_i32_le();
31287        __struct.mission_end = buf.get_i32_le();
31288        __struct.commanded_action = buf.get_i32_le();
31289        Ok(__struct)
31290    }
31291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31292        let mut __tmp = BytesMut::new(bytes);
31293        #[allow(clippy::absurd_extreme_comparisons)]
31294        #[allow(unused_comparisons)]
31295        if __tmp.remaining() < Self::ENCODED_LEN {
31296            panic!(
31297                "buffer is too small (need {} bytes, but got {})",
31298                Self::ENCODED_LEN,
31299                __tmp.remaining(),
31300            )
31301        }
31302        __tmp.put_i32_le(self.safe_return);
31303        __tmp.put_i32_le(self.land);
31304        __tmp.put_i32_le(self.mission_next_item);
31305        __tmp.put_i32_le(self.mission_end);
31306        __tmp.put_i32_le(self.commanded_action);
31307        if matches!(version, MavlinkVersion::V2) {
31308            let len = __tmp.len();
31309            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31310        } else {
31311            __tmp.len()
31312        }
31313    }
31314}
31315#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31316#[doc = ""]
31317#[doc = "ID: 333"]
31318#[derive(Debug, Clone, PartialEq)]
31319#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31321#[cfg_attr(feature = "ts", derive(TS))]
31322#[cfg_attr(feature = "ts", ts(export))]
31323pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31324    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31325    pub time_usec: u64,
31326    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31327    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31328    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31329    pub pos_x: [f32; 5],
31330    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31331    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31332    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31333    pub pos_y: [f32; 5],
31334    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31335    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31336    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31337    pub pos_z: [f32; 5],
31338    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31339    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31340    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31341    pub delta: [f32; 5],
31342    #[doc = "Yaw. Set to NaN for unchanged"]
31343    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31344    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31345    pub pos_yaw: [f32; 5],
31346    #[doc = "Number of valid control points (up-to 5 points are possible)"]
31347    pub valid_points: u8,
31348}
31349impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31350    pub const ENCODED_LEN: usize = 109usize;
31351    pub const DEFAULT: Self = Self {
31352        time_usec: 0_u64,
31353        pos_x: [0.0_f32; 5usize],
31354        pos_y: [0.0_f32; 5usize],
31355        pos_z: [0.0_f32; 5usize],
31356        delta: [0.0_f32; 5usize],
31357        pos_yaw: [0.0_f32; 5usize],
31358        valid_points: 0_u8,
31359    };
31360    #[cfg(feature = "arbitrary")]
31361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31362        use arbitrary::{Arbitrary, Unstructured};
31363        let mut buf = [0u8; 1024];
31364        rng.fill_bytes(&mut buf);
31365        let mut unstructured = Unstructured::new(&buf);
31366        Self::arbitrary(&mut unstructured).unwrap_or_default()
31367    }
31368}
31369impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31370    fn default() -> Self {
31371        Self::DEFAULT.clone()
31372    }
31373}
31374impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31375    type Message = MavMessage;
31376    const ID: u32 = 333u32;
31377    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
31378    const EXTRA_CRC: u8 = 231u8;
31379    const ENCODED_LEN: usize = 109usize;
31380    fn deser(
31381        _version: MavlinkVersion,
31382        __input: &[u8],
31383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31384        let avail_len = __input.len();
31385        let mut payload_buf = [0; Self::ENCODED_LEN];
31386        let mut buf = if avail_len < Self::ENCODED_LEN {
31387            payload_buf[0..avail_len].copy_from_slice(__input);
31388            Bytes::new(&payload_buf)
31389        } else {
31390            Bytes::new(__input)
31391        };
31392        let mut __struct = Self::default();
31393        __struct.time_usec = buf.get_u64_le();
31394        for v in &mut __struct.pos_x {
31395            let val = buf.get_f32_le();
31396            *v = val;
31397        }
31398        for v in &mut __struct.pos_y {
31399            let val = buf.get_f32_le();
31400            *v = val;
31401        }
31402        for v in &mut __struct.pos_z {
31403            let val = buf.get_f32_le();
31404            *v = val;
31405        }
31406        for v in &mut __struct.delta {
31407            let val = buf.get_f32_le();
31408            *v = val;
31409        }
31410        for v in &mut __struct.pos_yaw {
31411            let val = buf.get_f32_le();
31412            *v = val;
31413        }
31414        __struct.valid_points = buf.get_u8();
31415        Ok(__struct)
31416    }
31417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31418        let mut __tmp = BytesMut::new(bytes);
31419        #[allow(clippy::absurd_extreme_comparisons)]
31420        #[allow(unused_comparisons)]
31421        if __tmp.remaining() < Self::ENCODED_LEN {
31422            panic!(
31423                "buffer is too small (need {} bytes, but got {})",
31424                Self::ENCODED_LEN,
31425                __tmp.remaining(),
31426            )
31427        }
31428        __tmp.put_u64_le(self.time_usec);
31429        for val in &self.pos_x {
31430            __tmp.put_f32_le(*val);
31431        }
31432        for val in &self.pos_y {
31433            __tmp.put_f32_le(*val);
31434        }
31435        for val in &self.pos_z {
31436            __tmp.put_f32_le(*val);
31437        }
31438        for val in &self.delta {
31439            __tmp.put_f32_le(*val);
31440        }
31441        for val in &self.pos_yaw {
31442            __tmp.put_f32_le(*val);
31443        }
31444        __tmp.put_u8(self.valid_points);
31445        if matches!(version, MavlinkVersion::V2) {
31446            let len = __tmp.len();
31447            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31448        } else {
31449            __tmp.len()
31450        }
31451    }
31452}
31453#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
31454#[doc = ""]
31455#[doc = "ID: 332"]
31456#[derive(Debug, Clone, PartialEq)]
31457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31459#[cfg_attr(feature = "ts", derive(TS))]
31460#[cfg_attr(feature = "ts", ts(export))]
31461pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31462    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31463    pub time_usec: u64,
31464    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
31465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31466    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31467    pub pos_x: [f32; 5],
31468    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
31469    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31470    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31471    pub pos_y: [f32; 5],
31472    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
31473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31474    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31475    pub pos_z: [f32; 5],
31476    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
31477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31479    pub vel_x: [f32; 5],
31480    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
31481    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31482    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31483    pub vel_y: [f32; 5],
31484    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
31485    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31486    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31487    pub vel_z: [f32; 5],
31488    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
31489    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31490    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31491    pub acc_x: [f32; 5],
31492    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
31493    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31494    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31495    pub acc_y: [f32; 5],
31496    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
31497    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31498    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31499    pub acc_z: [f32; 5],
31500    #[doc = "Yaw angle, set to NaN if not being used"]
31501    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31502    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31503    pub pos_yaw: [f32; 5],
31504    #[doc = "Yaw rate, set to NaN if not being used"]
31505    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31506    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31507    pub vel_yaw: [f32; 5],
31508    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
31509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31510    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31511    pub command: [u16; 5],
31512    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
31513    pub valid_points: u8,
31514}
31515impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31516    pub const ENCODED_LEN: usize = 239usize;
31517    pub const DEFAULT: Self = Self {
31518        time_usec: 0_u64,
31519        pos_x: [0.0_f32; 5usize],
31520        pos_y: [0.0_f32; 5usize],
31521        pos_z: [0.0_f32; 5usize],
31522        vel_x: [0.0_f32; 5usize],
31523        vel_y: [0.0_f32; 5usize],
31524        vel_z: [0.0_f32; 5usize],
31525        acc_x: [0.0_f32; 5usize],
31526        acc_y: [0.0_f32; 5usize],
31527        acc_z: [0.0_f32; 5usize],
31528        pos_yaw: [0.0_f32; 5usize],
31529        vel_yaw: [0.0_f32; 5usize],
31530        command: [0_u16; 5usize],
31531        valid_points: 0_u8,
31532    };
31533    #[cfg(feature = "arbitrary")]
31534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31535        use arbitrary::{Arbitrary, Unstructured};
31536        let mut buf = [0u8; 1024];
31537        rng.fill_bytes(&mut buf);
31538        let mut unstructured = Unstructured::new(&buf);
31539        Self::arbitrary(&mut unstructured).unwrap_or_default()
31540    }
31541}
31542impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31543    fn default() -> Self {
31544        Self::DEFAULT.clone()
31545    }
31546}
31547impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31548    type Message = MavMessage;
31549    const ID: u32 = 332u32;
31550    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
31551    const EXTRA_CRC: u8 = 236u8;
31552    const ENCODED_LEN: usize = 239usize;
31553    fn deser(
31554        _version: MavlinkVersion,
31555        __input: &[u8],
31556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31557        let avail_len = __input.len();
31558        let mut payload_buf = [0; Self::ENCODED_LEN];
31559        let mut buf = if avail_len < Self::ENCODED_LEN {
31560            payload_buf[0..avail_len].copy_from_slice(__input);
31561            Bytes::new(&payload_buf)
31562        } else {
31563            Bytes::new(__input)
31564        };
31565        let mut __struct = Self::default();
31566        __struct.time_usec = buf.get_u64_le();
31567        for v in &mut __struct.pos_x {
31568            let val = buf.get_f32_le();
31569            *v = val;
31570        }
31571        for v in &mut __struct.pos_y {
31572            let val = buf.get_f32_le();
31573            *v = val;
31574        }
31575        for v in &mut __struct.pos_z {
31576            let val = buf.get_f32_le();
31577            *v = val;
31578        }
31579        for v in &mut __struct.vel_x {
31580            let val = buf.get_f32_le();
31581            *v = val;
31582        }
31583        for v in &mut __struct.vel_y {
31584            let val = buf.get_f32_le();
31585            *v = val;
31586        }
31587        for v in &mut __struct.vel_z {
31588            let val = buf.get_f32_le();
31589            *v = val;
31590        }
31591        for v in &mut __struct.acc_x {
31592            let val = buf.get_f32_le();
31593            *v = val;
31594        }
31595        for v in &mut __struct.acc_y {
31596            let val = buf.get_f32_le();
31597            *v = val;
31598        }
31599        for v in &mut __struct.acc_z {
31600            let val = buf.get_f32_le();
31601            *v = val;
31602        }
31603        for v in &mut __struct.pos_yaw {
31604            let val = buf.get_f32_le();
31605            *v = val;
31606        }
31607        for v in &mut __struct.vel_yaw {
31608            let val = buf.get_f32_le();
31609            *v = val;
31610        }
31611        for v in &mut __struct.command {
31612            let val = buf.get_u16_le();
31613            *v = val;
31614        }
31615        __struct.valid_points = buf.get_u8();
31616        Ok(__struct)
31617    }
31618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31619        let mut __tmp = BytesMut::new(bytes);
31620        #[allow(clippy::absurd_extreme_comparisons)]
31621        #[allow(unused_comparisons)]
31622        if __tmp.remaining() < Self::ENCODED_LEN {
31623            panic!(
31624                "buffer is too small (need {} bytes, but got {})",
31625                Self::ENCODED_LEN,
31626                __tmp.remaining(),
31627            )
31628        }
31629        __tmp.put_u64_le(self.time_usec);
31630        for val in &self.pos_x {
31631            __tmp.put_f32_le(*val);
31632        }
31633        for val in &self.pos_y {
31634            __tmp.put_f32_le(*val);
31635        }
31636        for val in &self.pos_z {
31637            __tmp.put_f32_le(*val);
31638        }
31639        for val in &self.vel_x {
31640            __tmp.put_f32_le(*val);
31641        }
31642        for val in &self.vel_y {
31643            __tmp.put_f32_le(*val);
31644        }
31645        for val in &self.vel_z {
31646            __tmp.put_f32_le(*val);
31647        }
31648        for val in &self.acc_x {
31649            __tmp.put_f32_le(*val);
31650        }
31651        for val in &self.acc_y {
31652            __tmp.put_f32_le(*val);
31653        }
31654        for val in &self.acc_z {
31655            __tmp.put_f32_le(*val);
31656        }
31657        for val in &self.pos_yaw {
31658            __tmp.put_f32_le(*val);
31659        }
31660        for val in &self.vel_yaw {
31661            __tmp.put_f32_le(*val);
31662        }
31663        for val in &self.command {
31664            __tmp.put_u16_le(*val);
31665        }
31666        __tmp.put_u8(self.valid_points);
31667        if matches!(version, MavlinkVersion::V2) {
31668            let len = __tmp.len();
31669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31670        } else {
31671            __tmp.len()
31672        }
31673    }
31674}
31675#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
31676#[doc = ""]
31677#[doc = "ID: 385"]
31678#[derive(Debug, Clone, PartialEq)]
31679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31681#[cfg_attr(feature = "ts", derive(TS))]
31682#[cfg_attr(feature = "ts", ts(export))]
31683pub struct TUNNEL_DATA {
31684    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31685    pub payload_type: MavTunnelPayloadType,
31686    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
31687    pub target_system: u8,
31688    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
31689    pub target_component: u8,
31690    #[doc = "Length of the data transported in payload"]
31691    pub payload_length: u8,
31692    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
31693    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31694    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31695    pub payload: [u8; 128],
31696}
31697impl TUNNEL_DATA {
31698    pub const ENCODED_LEN: usize = 133usize;
31699    pub const DEFAULT: Self = Self {
31700        payload_type: MavTunnelPayloadType::DEFAULT,
31701        target_system: 0_u8,
31702        target_component: 0_u8,
31703        payload_length: 0_u8,
31704        payload: [0_u8; 128usize],
31705    };
31706    #[cfg(feature = "arbitrary")]
31707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31708        use arbitrary::{Arbitrary, Unstructured};
31709        let mut buf = [0u8; 1024];
31710        rng.fill_bytes(&mut buf);
31711        let mut unstructured = Unstructured::new(&buf);
31712        Self::arbitrary(&mut unstructured).unwrap_or_default()
31713    }
31714}
31715impl Default for TUNNEL_DATA {
31716    fn default() -> Self {
31717        Self::DEFAULT.clone()
31718    }
31719}
31720impl MessageData for TUNNEL_DATA {
31721    type Message = MavMessage;
31722    const ID: u32 = 385u32;
31723    const NAME: &'static str = "TUNNEL";
31724    const EXTRA_CRC: u8 = 147u8;
31725    const ENCODED_LEN: usize = 133usize;
31726    fn deser(
31727        _version: MavlinkVersion,
31728        __input: &[u8],
31729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31730        let avail_len = __input.len();
31731        let mut payload_buf = [0; Self::ENCODED_LEN];
31732        let mut buf = if avail_len < Self::ENCODED_LEN {
31733            payload_buf[0..avail_len].copy_from_slice(__input);
31734            Bytes::new(&payload_buf)
31735        } else {
31736            Bytes::new(__input)
31737        };
31738        let mut __struct = Self::default();
31739        let tmp = buf.get_u16_le();
31740        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
31741            ::mavlink_core::error::ParserError::InvalidEnum {
31742                enum_type: "MavTunnelPayloadType",
31743                value: tmp as u32,
31744            },
31745        )?;
31746        __struct.target_system = buf.get_u8();
31747        __struct.target_component = buf.get_u8();
31748        __struct.payload_length = buf.get_u8();
31749        for v in &mut __struct.payload {
31750            let val = buf.get_u8();
31751            *v = val;
31752        }
31753        Ok(__struct)
31754    }
31755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31756        let mut __tmp = BytesMut::new(bytes);
31757        #[allow(clippy::absurd_extreme_comparisons)]
31758        #[allow(unused_comparisons)]
31759        if __tmp.remaining() < Self::ENCODED_LEN {
31760            panic!(
31761                "buffer is too small (need {} bytes, but got {})",
31762                Self::ENCODED_LEN,
31763                __tmp.remaining(),
31764            )
31765        }
31766        __tmp.put_u16_le(self.payload_type as u16);
31767        __tmp.put_u8(self.target_system);
31768        __tmp.put_u8(self.target_component);
31769        __tmp.put_u8(self.payload_length);
31770        for val in &self.payload {
31771            __tmp.put_u8(*val);
31772        }
31773        if matches!(version, MavlinkVersion::V2) {
31774            let len = __tmp.len();
31775            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31776        } else {
31777            __tmp.len()
31778        }
31779    }
31780}
31781#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
31782#[doc = ""]
31783#[doc = "ID: 311"]
31784#[derive(Debug, Clone, PartialEq)]
31785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31787#[cfg_attr(feature = "ts", derive(TS))]
31788#[cfg_attr(feature = "ts", ts(export))]
31789pub struct UAVCAN_NODE_INFO_DATA {
31790    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31791    pub time_usec: u64,
31792    #[doc = "Time since the start-up of the node."]
31793    pub uptime_sec: u32,
31794    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
31795    pub sw_vcs_commit: u32,
31796    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
31797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31798    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31799    pub name: [u8; 80],
31800    #[doc = "Hardware major version number."]
31801    pub hw_version_major: u8,
31802    #[doc = "Hardware minor version number."]
31803    pub hw_version_minor: u8,
31804    #[doc = "Hardware unique 128-bit ID."]
31805    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31806    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31807    pub hw_unique_id: [u8; 16],
31808    #[doc = "Software major version number."]
31809    pub sw_version_major: u8,
31810    #[doc = "Software minor version number."]
31811    pub sw_version_minor: u8,
31812}
31813impl UAVCAN_NODE_INFO_DATA {
31814    pub const ENCODED_LEN: usize = 116usize;
31815    pub const DEFAULT: Self = Self {
31816        time_usec: 0_u64,
31817        uptime_sec: 0_u32,
31818        sw_vcs_commit: 0_u32,
31819        name: [0_u8; 80usize],
31820        hw_version_major: 0_u8,
31821        hw_version_minor: 0_u8,
31822        hw_unique_id: [0_u8; 16usize],
31823        sw_version_major: 0_u8,
31824        sw_version_minor: 0_u8,
31825    };
31826    #[cfg(feature = "arbitrary")]
31827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31828        use arbitrary::{Arbitrary, Unstructured};
31829        let mut buf = [0u8; 1024];
31830        rng.fill_bytes(&mut buf);
31831        let mut unstructured = Unstructured::new(&buf);
31832        Self::arbitrary(&mut unstructured).unwrap_or_default()
31833    }
31834}
31835impl Default for UAVCAN_NODE_INFO_DATA {
31836    fn default() -> Self {
31837        Self::DEFAULT.clone()
31838    }
31839}
31840impl MessageData for UAVCAN_NODE_INFO_DATA {
31841    type Message = MavMessage;
31842    const ID: u32 = 311u32;
31843    const NAME: &'static str = "UAVCAN_NODE_INFO";
31844    const EXTRA_CRC: u8 = 95u8;
31845    const ENCODED_LEN: usize = 116usize;
31846    fn deser(
31847        _version: MavlinkVersion,
31848        __input: &[u8],
31849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31850        let avail_len = __input.len();
31851        let mut payload_buf = [0; Self::ENCODED_LEN];
31852        let mut buf = if avail_len < Self::ENCODED_LEN {
31853            payload_buf[0..avail_len].copy_from_slice(__input);
31854            Bytes::new(&payload_buf)
31855        } else {
31856            Bytes::new(__input)
31857        };
31858        let mut __struct = Self::default();
31859        __struct.time_usec = buf.get_u64_le();
31860        __struct.uptime_sec = buf.get_u32_le();
31861        __struct.sw_vcs_commit = buf.get_u32_le();
31862        for v in &mut __struct.name {
31863            let val = buf.get_u8();
31864            *v = val;
31865        }
31866        __struct.hw_version_major = buf.get_u8();
31867        __struct.hw_version_minor = buf.get_u8();
31868        for v in &mut __struct.hw_unique_id {
31869            let val = buf.get_u8();
31870            *v = val;
31871        }
31872        __struct.sw_version_major = buf.get_u8();
31873        __struct.sw_version_minor = buf.get_u8();
31874        Ok(__struct)
31875    }
31876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31877        let mut __tmp = BytesMut::new(bytes);
31878        #[allow(clippy::absurd_extreme_comparisons)]
31879        #[allow(unused_comparisons)]
31880        if __tmp.remaining() < Self::ENCODED_LEN {
31881            panic!(
31882                "buffer is too small (need {} bytes, but got {})",
31883                Self::ENCODED_LEN,
31884                __tmp.remaining(),
31885            )
31886        }
31887        __tmp.put_u64_le(self.time_usec);
31888        __tmp.put_u32_le(self.uptime_sec);
31889        __tmp.put_u32_le(self.sw_vcs_commit);
31890        for val in &self.name {
31891            __tmp.put_u8(*val);
31892        }
31893        __tmp.put_u8(self.hw_version_major);
31894        __tmp.put_u8(self.hw_version_minor);
31895        for val in &self.hw_unique_id {
31896            __tmp.put_u8(*val);
31897        }
31898        __tmp.put_u8(self.sw_version_major);
31899        __tmp.put_u8(self.sw_version_minor);
31900        if matches!(version, MavlinkVersion::V2) {
31901            let len = __tmp.len();
31902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31903        } else {
31904            __tmp.len()
31905        }
31906    }
31907}
31908#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
31909#[doc = ""]
31910#[doc = "ID: 310"]
31911#[derive(Debug, Clone, PartialEq)]
31912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31914#[cfg_attr(feature = "ts", derive(TS))]
31915#[cfg_attr(feature = "ts", ts(export))]
31916pub struct UAVCAN_NODE_STATUS_DATA {
31917    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31918    pub time_usec: u64,
31919    #[doc = "Time since the start-up of the node."]
31920    pub uptime_sec: u32,
31921    #[doc = "Vendor-specific status information."]
31922    pub vendor_specific_status_code: u16,
31923    #[doc = "Generalized node health status."]
31924    pub health: UavcanNodeHealth,
31925    #[doc = "Generalized operating mode."]
31926    pub mode: UavcanNodeMode,
31927    #[doc = "Not used currently."]
31928    pub sub_mode: u8,
31929}
31930impl UAVCAN_NODE_STATUS_DATA {
31931    pub const ENCODED_LEN: usize = 17usize;
31932    pub const DEFAULT: Self = Self {
31933        time_usec: 0_u64,
31934        uptime_sec: 0_u32,
31935        vendor_specific_status_code: 0_u16,
31936        health: UavcanNodeHealth::DEFAULT,
31937        mode: UavcanNodeMode::DEFAULT,
31938        sub_mode: 0_u8,
31939    };
31940    #[cfg(feature = "arbitrary")]
31941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31942        use arbitrary::{Arbitrary, Unstructured};
31943        let mut buf = [0u8; 1024];
31944        rng.fill_bytes(&mut buf);
31945        let mut unstructured = Unstructured::new(&buf);
31946        Self::arbitrary(&mut unstructured).unwrap_or_default()
31947    }
31948}
31949impl Default for UAVCAN_NODE_STATUS_DATA {
31950    fn default() -> Self {
31951        Self::DEFAULT.clone()
31952    }
31953}
31954impl MessageData for UAVCAN_NODE_STATUS_DATA {
31955    type Message = MavMessage;
31956    const ID: u32 = 310u32;
31957    const NAME: &'static str = "UAVCAN_NODE_STATUS";
31958    const EXTRA_CRC: u8 = 28u8;
31959    const ENCODED_LEN: usize = 17usize;
31960    fn deser(
31961        _version: MavlinkVersion,
31962        __input: &[u8],
31963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31964        let avail_len = __input.len();
31965        let mut payload_buf = [0; Self::ENCODED_LEN];
31966        let mut buf = if avail_len < Self::ENCODED_LEN {
31967            payload_buf[0..avail_len].copy_from_slice(__input);
31968            Bytes::new(&payload_buf)
31969        } else {
31970            Bytes::new(__input)
31971        };
31972        let mut __struct = Self::default();
31973        __struct.time_usec = buf.get_u64_le();
31974        __struct.uptime_sec = buf.get_u32_le();
31975        __struct.vendor_specific_status_code = buf.get_u16_le();
31976        let tmp = buf.get_u8();
31977        __struct.health =
31978            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31979                enum_type: "UavcanNodeHealth",
31980                value: tmp as u32,
31981            })?;
31982        let tmp = buf.get_u8();
31983        __struct.mode =
31984            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31985                enum_type: "UavcanNodeMode",
31986                value: tmp as u32,
31987            })?;
31988        __struct.sub_mode = buf.get_u8();
31989        Ok(__struct)
31990    }
31991    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31992        let mut __tmp = BytesMut::new(bytes);
31993        #[allow(clippy::absurd_extreme_comparisons)]
31994        #[allow(unused_comparisons)]
31995        if __tmp.remaining() < Self::ENCODED_LEN {
31996            panic!(
31997                "buffer is too small (need {} bytes, but got {})",
31998                Self::ENCODED_LEN,
31999                __tmp.remaining(),
32000            )
32001        }
32002        __tmp.put_u64_le(self.time_usec);
32003        __tmp.put_u32_le(self.uptime_sec);
32004        __tmp.put_u16_le(self.vendor_specific_status_code);
32005        __tmp.put_u8(self.health as u8);
32006        __tmp.put_u8(self.mode as u8);
32007        __tmp.put_u8(self.sub_mode);
32008        if matches!(version, MavlinkVersion::V2) {
32009            let len = __tmp.len();
32010            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32011        } else {
32012            __tmp.len()
32013        }
32014    }
32015}
32016#[doc = "The global position resulting from GPS and sensor fusion."]
32017#[doc = ""]
32018#[doc = "ID: 340"]
32019#[derive(Debug, Clone, PartialEq)]
32020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32021#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32022#[cfg_attr(feature = "ts", derive(TS))]
32023#[cfg_attr(feature = "ts", ts(export))]
32024pub struct UTM_GLOBAL_POSITION_DATA {
32025    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32026    pub time: u64,
32027    #[doc = "Latitude (WGS84)"]
32028    pub lat: i32,
32029    #[doc = "Longitude (WGS84)"]
32030    pub lon: i32,
32031    #[doc = "Altitude (WGS84)"]
32032    pub alt: i32,
32033    #[doc = "Altitude above ground"]
32034    pub relative_alt: i32,
32035    #[doc = "Next waypoint, latitude (WGS84)"]
32036    pub next_lat: i32,
32037    #[doc = "Next waypoint, longitude (WGS84)"]
32038    pub next_lon: i32,
32039    #[doc = "Next waypoint, altitude (WGS84)"]
32040    pub next_alt: i32,
32041    #[doc = "Ground X speed (latitude, positive north)"]
32042    pub vx: i16,
32043    #[doc = "Ground Y speed (longitude, positive east)"]
32044    pub vy: i16,
32045    #[doc = "Ground Z speed (altitude, positive down)"]
32046    pub vz: i16,
32047    #[doc = "Horizontal position uncertainty (standard deviation)"]
32048    pub h_acc: u16,
32049    #[doc = "Altitude uncertainty (standard deviation)"]
32050    pub v_acc: u16,
32051    #[doc = "Speed uncertainty (standard deviation)"]
32052    pub vel_acc: u16,
32053    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32054    pub update_rate: u16,
32055    #[doc = "Unique UAS ID."]
32056    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32057    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32058    pub uas_id: [u8; 18],
32059    #[doc = "Flight state"]
32060    pub flight_state: UtmFlightState,
32061    #[doc = "Bitwise OR combination of the data available flags."]
32062    pub flags: UtmDataAvailFlags,
32063}
32064impl UTM_GLOBAL_POSITION_DATA {
32065    pub const ENCODED_LEN: usize = 70usize;
32066    pub const DEFAULT: Self = Self {
32067        time: 0_u64,
32068        lat: 0_i32,
32069        lon: 0_i32,
32070        alt: 0_i32,
32071        relative_alt: 0_i32,
32072        next_lat: 0_i32,
32073        next_lon: 0_i32,
32074        next_alt: 0_i32,
32075        vx: 0_i16,
32076        vy: 0_i16,
32077        vz: 0_i16,
32078        h_acc: 0_u16,
32079        v_acc: 0_u16,
32080        vel_acc: 0_u16,
32081        update_rate: 0_u16,
32082        uas_id: [0_u8; 18usize],
32083        flight_state: UtmFlightState::DEFAULT,
32084        flags: UtmDataAvailFlags::DEFAULT,
32085    };
32086    #[cfg(feature = "arbitrary")]
32087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32088        use arbitrary::{Arbitrary, Unstructured};
32089        let mut buf = [0u8; 1024];
32090        rng.fill_bytes(&mut buf);
32091        let mut unstructured = Unstructured::new(&buf);
32092        Self::arbitrary(&mut unstructured).unwrap_or_default()
32093    }
32094}
32095impl Default for UTM_GLOBAL_POSITION_DATA {
32096    fn default() -> Self {
32097        Self::DEFAULT.clone()
32098    }
32099}
32100impl MessageData for UTM_GLOBAL_POSITION_DATA {
32101    type Message = MavMessage;
32102    const ID: u32 = 340u32;
32103    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32104    const EXTRA_CRC: u8 = 99u8;
32105    const ENCODED_LEN: usize = 70usize;
32106    fn deser(
32107        _version: MavlinkVersion,
32108        __input: &[u8],
32109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32110        let avail_len = __input.len();
32111        let mut payload_buf = [0; Self::ENCODED_LEN];
32112        let mut buf = if avail_len < Self::ENCODED_LEN {
32113            payload_buf[0..avail_len].copy_from_slice(__input);
32114            Bytes::new(&payload_buf)
32115        } else {
32116            Bytes::new(__input)
32117        };
32118        let mut __struct = Self::default();
32119        __struct.time = buf.get_u64_le();
32120        __struct.lat = buf.get_i32_le();
32121        __struct.lon = buf.get_i32_le();
32122        __struct.alt = buf.get_i32_le();
32123        __struct.relative_alt = buf.get_i32_le();
32124        __struct.next_lat = buf.get_i32_le();
32125        __struct.next_lon = buf.get_i32_le();
32126        __struct.next_alt = buf.get_i32_le();
32127        __struct.vx = buf.get_i16_le();
32128        __struct.vy = buf.get_i16_le();
32129        __struct.vz = buf.get_i16_le();
32130        __struct.h_acc = buf.get_u16_le();
32131        __struct.v_acc = buf.get_u16_le();
32132        __struct.vel_acc = buf.get_u16_le();
32133        __struct.update_rate = buf.get_u16_le();
32134        for v in &mut __struct.uas_id {
32135            let val = buf.get_u8();
32136            *v = val;
32137        }
32138        let tmp = buf.get_u8();
32139        __struct.flight_state =
32140            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32141                enum_type: "UtmFlightState",
32142                value: tmp as u32,
32143            })?;
32144        let tmp = buf.get_u8();
32145        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
32146            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32147                flag_type: "UtmDataAvailFlags",
32148                value: tmp as u32,
32149            })?;
32150        Ok(__struct)
32151    }
32152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32153        let mut __tmp = BytesMut::new(bytes);
32154        #[allow(clippy::absurd_extreme_comparisons)]
32155        #[allow(unused_comparisons)]
32156        if __tmp.remaining() < Self::ENCODED_LEN {
32157            panic!(
32158                "buffer is too small (need {} bytes, but got {})",
32159                Self::ENCODED_LEN,
32160                __tmp.remaining(),
32161            )
32162        }
32163        __tmp.put_u64_le(self.time);
32164        __tmp.put_i32_le(self.lat);
32165        __tmp.put_i32_le(self.lon);
32166        __tmp.put_i32_le(self.alt);
32167        __tmp.put_i32_le(self.relative_alt);
32168        __tmp.put_i32_le(self.next_lat);
32169        __tmp.put_i32_le(self.next_lon);
32170        __tmp.put_i32_le(self.next_alt);
32171        __tmp.put_i16_le(self.vx);
32172        __tmp.put_i16_le(self.vy);
32173        __tmp.put_i16_le(self.vz);
32174        __tmp.put_u16_le(self.h_acc);
32175        __tmp.put_u16_le(self.v_acc);
32176        __tmp.put_u16_le(self.vel_acc);
32177        __tmp.put_u16_le(self.update_rate);
32178        for val in &self.uas_id {
32179            __tmp.put_u8(*val);
32180        }
32181        __tmp.put_u8(self.flight_state as u8);
32182        __tmp.put_u8(self.flags.bits());
32183        if matches!(version, MavlinkVersion::V2) {
32184            let len = __tmp.len();
32185            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32186        } else {
32187            __tmp.len()
32188        }
32189    }
32190}
32191#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32192#[doc = ""]
32193#[doc = "ID: 248"]
32194#[derive(Debug, Clone, PartialEq)]
32195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32197#[cfg_attr(feature = "ts", derive(TS))]
32198#[cfg_attr(feature = "ts", ts(export))]
32199pub struct V2_EXTENSION_DATA {
32200    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32201    pub message_type: u16,
32202    #[doc = "Network ID (0 for broadcast)"]
32203    pub target_network: u8,
32204    #[doc = "System ID (0 for broadcast)"]
32205    pub target_system: u8,
32206    #[doc = "Component ID (0 for broadcast)"]
32207    pub target_component: u8,
32208    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32209    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32210    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32211    pub payload: [u8; 249],
32212}
32213impl V2_EXTENSION_DATA {
32214    pub const ENCODED_LEN: usize = 254usize;
32215    pub const DEFAULT: Self = Self {
32216        message_type: 0_u16,
32217        target_network: 0_u8,
32218        target_system: 0_u8,
32219        target_component: 0_u8,
32220        payload: [0_u8; 249usize],
32221    };
32222    #[cfg(feature = "arbitrary")]
32223    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32224        use arbitrary::{Arbitrary, Unstructured};
32225        let mut buf = [0u8; 1024];
32226        rng.fill_bytes(&mut buf);
32227        let mut unstructured = Unstructured::new(&buf);
32228        Self::arbitrary(&mut unstructured).unwrap_or_default()
32229    }
32230}
32231impl Default for V2_EXTENSION_DATA {
32232    fn default() -> Self {
32233        Self::DEFAULT.clone()
32234    }
32235}
32236impl MessageData for V2_EXTENSION_DATA {
32237    type Message = MavMessage;
32238    const ID: u32 = 248u32;
32239    const NAME: &'static str = "V2_EXTENSION";
32240    const EXTRA_CRC: u8 = 8u8;
32241    const ENCODED_LEN: usize = 254usize;
32242    fn deser(
32243        _version: MavlinkVersion,
32244        __input: &[u8],
32245    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32246        let avail_len = __input.len();
32247        let mut payload_buf = [0; Self::ENCODED_LEN];
32248        let mut buf = if avail_len < Self::ENCODED_LEN {
32249            payload_buf[0..avail_len].copy_from_slice(__input);
32250            Bytes::new(&payload_buf)
32251        } else {
32252            Bytes::new(__input)
32253        };
32254        let mut __struct = Self::default();
32255        __struct.message_type = buf.get_u16_le();
32256        __struct.target_network = buf.get_u8();
32257        __struct.target_system = buf.get_u8();
32258        __struct.target_component = buf.get_u8();
32259        for v in &mut __struct.payload {
32260            let val = buf.get_u8();
32261            *v = val;
32262        }
32263        Ok(__struct)
32264    }
32265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32266        let mut __tmp = BytesMut::new(bytes);
32267        #[allow(clippy::absurd_extreme_comparisons)]
32268        #[allow(unused_comparisons)]
32269        if __tmp.remaining() < Self::ENCODED_LEN {
32270            panic!(
32271                "buffer is too small (need {} bytes, but got {})",
32272                Self::ENCODED_LEN,
32273                __tmp.remaining(),
32274            )
32275        }
32276        __tmp.put_u16_le(self.message_type);
32277        __tmp.put_u8(self.target_network);
32278        __tmp.put_u8(self.target_system);
32279        __tmp.put_u8(self.target_component);
32280        for val in &self.payload {
32281            __tmp.put_u8(*val);
32282        }
32283        if matches!(version, MavlinkVersion::V2) {
32284            let len = __tmp.len();
32285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32286        } else {
32287            __tmp.len()
32288        }
32289    }
32290}
32291#[doc = "Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS."]
32292#[doc = ""]
32293#[doc = "ID: 355"]
32294#[derive(Debug, Clone, PartialEq)]
32295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32297#[cfg_attr(feature = "ts", derive(TS))]
32298#[cfg_attr(feature = "ts", ts(export))]
32299pub struct VELOCITY_LIMITS_DATA {
32300    #[doc = "Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied"]
32301    pub horizontal_speed_limit: f32,
32302    #[doc = "Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied"]
32303    pub vertical_speed_limit: f32,
32304    #[doc = "Limit for vehicle turn rate around its yaw axis. NaN: No limit applied"]
32305    pub yaw_rate_limit: f32,
32306}
32307impl VELOCITY_LIMITS_DATA {
32308    pub const ENCODED_LEN: usize = 12usize;
32309    pub const DEFAULT: Self = Self {
32310        horizontal_speed_limit: 0.0_f32,
32311        vertical_speed_limit: 0.0_f32,
32312        yaw_rate_limit: 0.0_f32,
32313    };
32314    #[cfg(feature = "arbitrary")]
32315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32316        use arbitrary::{Arbitrary, Unstructured};
32317        let mut buf = [0u8; 1024];
32318        rng.fill_bytes(&mut buf);
32319        let mut unstructured = Unstructured::new(&buf);
32320        Self::arbitrary(&mut unstructured).unwrap_or_default()
32321    }
32322}
32323impl Default for VELOCITY_LIMITS_DATA {
32324    fn default() -> Self {
32325        Self::DEFAULT.clone()
32326    }
32327}
32328impl MessageData for VELOCITY_LIMITS_DATA {
32329    type Message = MavMessage;
32330    const ID: u32 = 355u32;
32331    const NAME: &'static str = "VELOCITY_LIMITS";
32332    const EXTRA_CRC: u8 = 6u8;
32333    const ENCODED_LEN: usize = 12usize;
32334    fn deser(
32335        _version: MavlinkVersion,
32336        __input: &[u8],
32337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32338        let avail_len = __input.len();
32339        let mut payload_buf = [0; Self::ENCODED_LEN];
32340        let mut buf = if avail_len < Self::ENCODED_LEN {
32341            payload_buf[0..avail_len].copy_from_slice(__input);
32342            Bytes::new(&payload_buf)
32343        } else {
32344            Bytes::new(__input)
32345        };
32346        let mut __struct = Self::default();
32347        __struct.horizontal_speed_limit = buf.get_f32_le();
32348        __struct.vertical_speed_limit = buf.get_f32_le();
32349        __struct.yaw_rate_limit = buf.get_f32_le();
32350        Ok(__struct)
32351    }
32352    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32353        let mut __tmp = BytesMut::new(bytes);
32354        #[allow(clippy::absurd_extreme_comparisons)]
32355        #[allow(unused_comparisons)]
32356        if __tmp.remaining() < Self::ENCODED_LEN {
32357            panic!(
32358                "buffer is too small (need {} bytes, but got {})",
32359                Self::ENCODED_LEN,
32360                __tmp.remaining(),
32361            )
32362        }
32363        __tmp.put_f32_le(self.horizontal_speed_limit);
32364        __tmp.put_f32_le(self.vertical_speed_limit);
32365        __tmp.put_f32_le(self.yaw_rate_limit);
32366        if matches!(version, MavlinkVersion::V2) {
32367            let len = __tmp.len();
32368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32369        } else {
32370            __tmp.len()
32371        }
32372    }
32373}
32374#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32375#[doc = ""]
32376#[doc = "ID: 74"]
32377#[derive(Debug, Clone, PartialEq)]
32378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32380#[cfg_attr(feature = "ts", derive(TS))]
32381#[cfg_attr(feature = "ts", ts(export))]
32382pub struct VFR_HUD_DATA {
32383    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32384    pub airspeed: f32,
32385    #[doc = "Current ground speed."]
32386    pub groundspeed: f32,
32387    #[doc = "Current altitude (MSL)."]
32388    pub alt: f32,
32389    #[doc = "Current climb rate."]
32390    pub climb: f32,
32391    #[doc = "Current heading in compass units (0-360, 0=north)."]
32392    pub heading: i16,
32393    #[doc = "Current throttle setting (0 to 100)."]
32394    pub throttle: u16,
32395}
32396impl VFR_HUD_DATA {
32397    pub const ENCODED_LEN: usize = 20usize;
32398    pub const DEFAULT: Self = Self {
32399        airspeed: 0.0_f32,
32400        groundspeed: 0.0_f32,
32401        alt: 0.0_f32,
32402        climb: 0.0_f32,
32403        heading: 0_i16,
32404        throttle: 0_u16,
32405    };
32406    #[cfg(feature = "arbitrary")]
32407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32408        use arbitrary::{Arbitrary, Unstructured};
32409        let mut buf = [0u8; 1024];
32410        rng.fill_bytes(&mut buf);
32411        let mut unstructured = Unstructured::new(&buf);
32412        Self::arbitrary(&mut unstructured).unwrap_or_default()
32413    }
32414}
32415impl Default for VFR_HUD_DATA {
32416    fn default() -> Self {
32417        Self::DEFAULT.clone()
32418    }
32419}
32420impl MessageData for VFR_HUD_DATA {
32421    type Message = MavMessage;
32422    const ID: u32 = 74u32;
32423    const NAME: &'static str = "VFR_HUD";
32424    const EXTRA_CRC: u8 = 20u8;
32425    const ENCODED_LEN: usize = 20usize;
32426    fn deser(
32427        _version: MavlinkVersion,
32428        __input: &[u8],
32429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32430        let avail_len = __input.len();
32431        let mut payload_buf = [0; Self::ENCODED_LEN];
32432        let mut buf = if avail_len < Self::ENCODED_LEN {
32433            payload_buf[0..avail_len].copy_from_slice(__input);
32434            Bytes::new(&payload_buf)
32435        } else {
32436            Bytes::new(__input)
32437        };
32438        let mut __struct = Self::default();
32439        __struct.airspeed = buf.get_f32_le();
32440        __struct.groundspeed = buf.get_f32_le();
32441        __struct.alt = buf.get_f32_le();
32442        __struct.climb = buf.get_f32_le();
32443        __struct.heading = buf.get_i16_le();
32444        __struct.throttle = buf.get_u16_le();
32445        Ok(__struct)
32446    }
32447    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32448        let mut __tmp = BytesMut::new(bytes);
32449        #[allow(clippy::absurd_extreme_comparisons)]
32450        #[allow(unused_comparisons)]
32451        if __tmp.remaining() < Self::ENCODED_LEN {
32452            panic!(
32453                "buffer is too small (need {} bytes, but got {})",
32454                Self::ENCODED_LEN,
32455                __tmp.remaining(),
32456            )
32457        }
32458        __tmp.put_f32_le(self.airspeed);
32459        __tmp.put_f32_le(self.groundspeed);
32460        __tmp.put_f32_le(self.alt);
32461        __tmp.put_f32_le(self.climb);
32462        __tmp.put_i16_le(self.heading);
32463        __tmp.put_u16_le(self.throttle);
32464        if matches!(version, MavlinkVersion::V2) {
32465            let len = __tmp.len();
32466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32467        } else {
32468            __tmp.len()
32469        }
32470    }
32471}
32472#[doc = "Vibration levels and accelerometer clipping."]
32473#[doc = ""]
32474#[doc = "ID: 241"]
32475#[derive(Debug, Clone, PartialEq)]
32476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32478#[cfg_attr(feature = "ts", derive(TS))]
32479#[cfg_attr(feature = "ts", ts(export))]
32480pub struct VIBRATION_DATA {
32481    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32482    pub time_usec: u64,
32483    #[doc = "Vibration levels on X-axis"]
32484    pub vibration_x: f32,
32485    #[doc = "Vibration levels on Y-axis"]
32486    pub vibration_y: f32,
32487    #[doc = "Vibration levels on Z-axis"]
32488    pub vibration_z: f32,
32489    #[doc = "first accelerometer clipping count"]
32490    pub clipping_0: u32,
32491    #[doc = "second accelerometer clipping count"]
32492    pub clipping_1: u32,
32493    #[doc = "third accelerometer clipping count"]
32494    pub clipping_2: u32,
32495}
32496impl VIBRATION_DATA {
32497    pub const ENCODED_LEN: usize = 32usize;
32498    pub const DEFAULT: Self = Self {
32499        time_usec: 0_u64,
32500        vibration_x: 0.0_f32,
32501        vibration_y: 0.0_f32,
32502        vibration_z: 0.0_f32,
32503        clipping_0: 0_u32,
32504        clipping_1: 0_u32,
32505        clipping_2: 0_u32,
32506    };
32507    #[cfg(feature = "arbitrary")]
32508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32509        use arbitrary::{Arbitrary, Unstructured};
32510        let mut buf = [0u8; 1024];
32511        rng.fill_bytes(&mut buf);
32512        let mut unstructured = Unstructured::new(&buf);
32513        Self::arbitrary(&mut unstructured).unwrap_or_default()
32514    }
32515}
32516impl Default for VIBRATION_DATA {
32517    fn default() -> Self {
32518        Self::DEFAULT.clone()
32519    }
32520}
32521impl MessageData for VIBRATION_DATA {
32522    type Message = MavMessage;
32523    const ID: u32 = 241u32;
32524    const NAME: &'static str = "VIBRATION";
32525    const EXTRA_CRC: u8 = 90u8;
32526    const ENCODED_LEN: usize = 32usize;
32527    fn deser(
32528        _version: MavlinkVersion,
32529        __input: &[u8],
32530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32531        let avail_len = __input.len();
32532        let mut payload_buf = [0; Self::ENCODED_LEN];
32533        let mut buf = if avail_len < Self::ENCODED_LEN {
32534            payload_buf[0..avail_len].copy_from_slice(__input);
32535            Bytes::new(&payload_buf)
32536        } else {
32537            Bytes::new(__input)
32538        };
32539        let mut __struct = Self::default();
32540        __struct.time_usec = buf.get_u64_le();
32541        __struct.vibration_x = buf.get_f32_le();
32542        __struct.vibration_y = buf.get_f32_le();
32543        __struct.vibration_z = buf.get_f32_le();
32544        __struct.clipping_0 = buf.get_u32_le();
32545        __struct.clipping_1 = buf.get_u32_le();
32546        __struct.clipping_2 = buf.get_u32_le();
32547        Ok(__struct)
32548    }
32549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32550        let mut __tmp = BytesMut::new(bytes);
32551        #[allow(clippy::absurd_extreme_comparisons)]
32552        #[allow(unused_comparisons)]
32553        if __tmp.remaining() < Self::ENCODED_LEN {
32554            panic!(
32555                "buffer is too small (need {} bytes, but got {})",
32556                Self::ENCODED_LEN,
32557                __tmp.remaining(),
32558            )
32559        }
32560        __tmp.put_u64_le(self.time_usec);
32561        __tmp.put_f32_le(self.vibration_x);
32562        __tmp.put_f32_le(self.vibration_y);
32563        __tmp.put_f32_le(self.vibration_z);
32564        __tmp.put_u32_le(self.clipping_0);
32565        __tmp.put_u32_le(self.clipping_1);
32566        __tmp.put_u32_le(self.clipping_2);
32567        if matches!(version, MavlinkVersion::V2) {
32568            let len = __tmp.len();
32569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32570        } else {
32571            __tmp.len()
32572        }
32573    }
32574}
32575#[doc = "Global position estimate from a Vicon motion system source."]
32576#[doc = ""]
32577#[doc = "ID: 104"]
32578#[derive(Debug, Clone, PartialEq)]
32579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32581#[cfg_attr(feature = "ts", derive(TS))]
32582#[cfg_attr(feature = "ts", ts(export))]
32583pub struct VICON_POSITION_ESTIMATE_DATA {
32584    #[doc = "Timestamp (UNIX time or time since system boot)"]
32585    pub usec: u64,
32586    #[doc = "Global X position"]
32587    pub x: f32,
32588    #[doc = "Global Y position"]
32589    pub y: f32,
32590    #[doc = "Global Z position"]
32591    pub z: f32,
32592    #[doc = "Roll angle"]
32593    pub roll: f32,
32594    #[doc = "Pitch angle"]
32595    pub pitch: f32,
32596    #[doc = "Yaw angle"]
32597    pub yaw: f32,
32598    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32599    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32600    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32601    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32602    pub covariance: [f32; 21],
32603}
32604impl VICON_POSITION_ESTIMATE_DATA {
32605    pub const ENCODED_LEN: usize = 116usize;
32606    pub const DEFAULT: Self = Self {
32607        usec: 0_u64,
32608        x: 0.0_f32,
32609        y: 0.0_f32,
32610        z: 0.0_f32,
32611        roll: 0.0_f32,
32612        pitch: 0.0_f32,
32613        yaw: 0.0_f32,
32614        covariance: [0.0_f32; 21usize],
32615    };
32616    #[cfg(feature = "arbitrary")]
32617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32618        use arbitrary::{Arbitrary, Unstructured};
32619        let mut buf = [0u8; 1024];
32620        rng.fill_bytes(&mut buf);
32621        let mut unstructured = Unstructured::new(&buf);
32622        Self::arbitrary(&mut unstructured).unwrap_or_default()
32623    }
32624}
32625impl Default for VICON_POSITION_ESTIMATE_DATA {
32626    fn default() -> Self {
32627        Self::DEFAULT.clone()
32628    }
32629}
32630impl MessageData for VICON_POSITION_ESTIMATE_DATA {
32631    type Message = MavMessage;
32632    const ID: u32 = 104u32;
32633    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
32634    const EXTRA_CRC: u8 = 56u8;
32635    const ENCODED_LEN: usize = 116usize;
32636    fn deser(
32637        _version: MavlinkVersion,
32638        __input: &[u8],
32639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32640        let avail_len = __input.len();
32641        let mut payload_buf = [0; Self::ENCODED_LEN];
32642        let mut buf = if avail_len < Self::ENCODED_LEN {
32643            payload_buf[0..avail_len].copy_from_slice(__input);
32644            Bytes::new(&payload_buf)
32645        } else {
32646            Bytes::new(__input)
32647        };
32648        let mut __struct = Self::default();
32649        __struct.usec = buf.get_u64_le();
32650        __struct.x = buf.get_f32_le();
32651        __struct.y = buf.get_f32_le();
32652        __struct.z = buf.get_f32_le();
32653        __struct.roll = buf.get_f32_le();
32654        __struct.pitch = buf.get_f32_le();
32655        __struct.yaw = buf.get_f32_le();
32656        for v in &mut __struct.covariance {
32657            let val = buf.get_f32_le();
32658            *v = val;
32659        }
32660        Ok(__struct)
32661    }
32662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32663        let mut __tmp = BytesMut::new(bytes);
32664        #[allow(clippy::absurd_extreme_comparisons)]
32665        #[allow(unused_comparisons)]
32666        if __tmp.remaining() < Self::ENCODED_LEN {
32667            panic!(
32668                "buffer is too small (need {} bytes, but got {})",
32669                Self::ENCODED_LEN,
32670                __tmp.remaining(),
32671            )
32672        }
32673        __tmp.put_u64_le(self.usec);
32674        __tmp.put_f32_le(self.x);
32675        __tmp.put_f32_le(self.y);
32676        __tmp.put_f32_le(self.z);
32677        __tmp.put_f32_le(self.roll);
32678        __tmp.put_f32_le(self.pitch);
32679        __tmp.put_f32_le(self.yaw);
32680        if matches!(version, MavlinkVersion::V2) {
32681            for val in &self.covariance {
32682                __tmp.put_f32_le(*val);
32683            }
32684            let len = __tmp.len();
32685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32686        } else {
32687            __tmp.len()
32688        }
32689    }
32690}
32691#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32692#[doc = ""]
32693#[doc = "ID: 269"]
32694#[derive(Debug, Clone, PartialEq)]
32695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32697#[cfg_attr(feature = "ts", derive(TS))]
32698#[cfg_attr(feature = "ts", ts(export))]
32699pub struct VIDEO_STREAM_INFORMATION_DATA {
32700    #[doc = "Frame rate."]
32701    pub framerate: f32,
32702    #[doc = "Bit rate."]
32703    pub bitrate: u32,
32704    #[doc = "Bitmap of stream status flags."]
32705    pub flags: VideoStreamStatusFlags,
32706    #[doc = "Horizontal resolution."]
32707    pub resolution_h: u16,
32708    #[doc = "Vertical resolution."]
32709    pub resolution_v: u16,
32710    #[doc = "Video image rotation clockwise."]
32711    pub rotation: u16,
32712    #[doc = "Horizontal Field of view."]
32713    pub hfov: u16,
32714    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32715    pub stream_id: u8,
32716    #[doc = "Number of streams available."]
32717    pub count: u8,
32718    #[doc = "Type of stream."]
32719    pub mavtype: VideoStreamType,
32720    #[doc = "Stream name."]
32721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32722    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32723    pub name: [u8; 32],
32724    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
32725    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32726    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32727    pub uri: [u8; 160],
32728    #[doc = "Encoding of stream."]
32729    #[cfg_attr(feature = "serde", serde(default))]
32730    pub encoding: VideoStreamEncoding,
32731    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32732    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32733    pub camera_device_id: u8,
32734}
32735impl VIDEO_STREAM_INFORMATION_DATA {
32736    pub const ENCODED_LEN: usize = 215usize;
32737    pub const DEFAULT: Self = Self {
32738        framerate: 0.0_f32,
32739        bitrate: 0_u32,
32740        flags: VideoStreamStatusFlags::DEFAULT,
32741        resolution_h: 0_u16,
32742        resolution_v: 0_u16,
32743        rotation: 0_u16,
32744        hfov: 0_u16,
32745        stream_id: 0_u8,
32746        count: 0_u8,
32747        mavtype: VideoStreamType::DEFAULT,
32748        name: [0_u8; 32usize],
32749        uri: [0_u8; 160usize],
32750        encoding: VideoStreamEncoding::DEFAULT,
32751        camera_device_id: 0_u8,
32752    };
32753    #[cfg(feature = "arbitrary")]
32754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32755        use arbitrary::{Arbitrary, Unstructured};
32756        let mut buf = [0u8; 1024];
32757        rng.fill_bytes(&mut buf);
32758        let mut unstructured = Unstructured::new(&buf);
32759        Self::arbitrary(&mut unstructured).unwrap_or_default()
32760    }
32761}
32762impl Default for VIDEO_STREAM_INFORMATION_DATA {
32763    fn default() -> Self {
32764        Self::DEFAULT.clone()
32765    }
32766}
32767impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
32768    type Message = MavMessage;
32769    const ID: u32 = 269u32;
32770    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
32771    const EXTRA_CRC: u8 = 109u8;
32772    const ENCODED_LEN: usize = 215usize;
32773    fn deser(
32774        _version: MavlinkVersion,
32775        __input: &[u8],
32776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32777        let avail_len = __input.len();
32778        let mut payload_buf = [0; Self::ENCODED_LEN];
32779        let mut buf = if avail_len < Self::ENCODED_LEN {
32780            payload_buf[0..avail_len].copy_from_slice(__input);
32781            Bytes::new(&payload_buf)
32782        } else {
32783            Bytes::new(__input)
32784        };
32785        let mut __struct = Self::default();
32786        __struct.framerate = buf.get_f32_le();
32787        __struct.bitrate = buf.get_u32_le();
32788        let tmp = buf.get_u16_le();
32789        __struct.flags = VideoStreamStatusFlags::from_bits(
32790            tmp & VideoStreamStatusFlags::all().bits(),
32791        )
32792        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32793            flag_type: "VideoStreamStatusFlags",
32794            value: tmp as u32,
32795        })?;
32796        __struct.resolution_h = buf.get_u16_le();
32797        __struct.resolution_v = buf.get_u16_le();
32798        __struct.rotation = buf.get_u16_le();
32799        __struct.hfov = buf.get_u16_le();
32800        __struct.stream_id = buf.get_u8();
32801        __struct.count = buf.get_u8();
32802        let tmp = buf.get_u8();
32803        __struct.mavtype =
32804            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32805                enum_type: "VideoStreamType",
32806                value: tmp as u32,
32807            })?;
32808        for v in &mut __struct.name {
32809            let val = buf.get_u8();
32810            *v = val;
32811        }
32812        for v in &mut __struct.uri {
32813            let val = buf.get_u8();
32814            *v = val;
32815        }
32816        let tmp = buf.get_u8();
32817        __struct.encoding =
32818            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32819                enum_type: "VideoStreamEncoding",
32820                value: tmp as u32,
32821            })?;
32822        __struct.camera_device_id = buf.get_u8();
32823        Ok(__struct)
32824    }
32825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32826        let mut __tmp = BytesMut::new(bytes);
32827        #[allow(clippy::absurd_extreme_comparisons)]
32828        #[allow(unused_comparisons)]
32829        if __tmp.remaining() < Self::ENCODED_LEN {
32830            panic!(
32831                "buffer is too small (need {} bytes, but got {})",
32832                Self::ENCODED_LEN,
32833                __tmp.remaining(),
32834            )
32835        }
32836        __tmp.put_f32_le(self.framerate);
32837        __tmp.put_u32_le(self.bitrate);
32838        __tmp.put_u16_le(self.flags.bits());
32839        __tmp.put_u16_le(self.resolution_h);
32840        __tmp.put_u16_le(self.resolution_v);
32841        __tmp.put_u16_le(self.rotation);
32842        __tmp.put_u16_le(self.hfov);
32843        __tmp.put_u8(self.stream_id);
32844        __tmp.put_u8(self.count);
32845        __tmp.put_u8(self.mavtype as u8);
32846        for val in &self.name {
32847            __tmp.put_u8(*val);
32848        }
32849        for val in &self.uri {
32850            __tmp.put_u8(*val);
32851        }
32852        if matches!(version, MavlinkVersion::V2) {
32853            __tmp.put_u8(self.encoding as u8);
32854            __tmp.put_u8(self.camera_device_id);
32855            let len = __tmp.len();
32856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32857        } else {
32858            __tmp.len()
32859        }
32860    }
32861}
32862#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32863#[doc = ""]
32864#[doc = "ID: 270"]
32865#[derive(Debug, Clone, PartialEq)]
32866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32868#[cfg_attr(feature = "ts", derive(TS))]
32869#[cfg_attr(feature = "ts", ts(export))]
32870pub struct VIDEO_STREAM_STATUS_DATA {
32871    #[doc = "Frame rate"]
32872    pub framerate: f32,
32873    #[doc = "Bit rate"]
32874    pub bitrate: u32,
32875    #[doc = "Bitmap of stream status flags"]
32876    pub flags: VideoStreamStatusFlags,
32877    #[doc = "Horizontal resolution"]
32878    pub resolution_h: u16,
32879    #[doc = "Vertical resolution"]
32880    pub resolution_v: u16,
32881    #[doc = "Video image rotation clockwise"]
32882    pub rotation: u16,
32883    #[doc = "Horizontal Field of view"]
32884    pub hfov: u16,
32885    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32886    pub stream_id: u8,
32887    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32888    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32889    pub camera_device_id: u8,
32890}
32891impl VIDEO_STREAM_STATUS_DATA {
32892    pub const ENCODED_LEN: usize = 20usize;
32893    pub const DEFAULT: Self = Self {
32894        framerate: 0.0_f32,
32895        bitrate: 0_u32,
32896        flags: VideoStreamStatusFlags::DEFAULT,
32897        resolution_h: 0_u16,
32898        resolution_v: 0_u16,
32899        rotation: 0_u16,
32900        hfov: 0_u16,
32901        stream_id: 0_u8,
32902        camera_device_id: 0_u8,
32903    };
32904    #[cfg(feature = "arbitrary")]
32905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32906        use arbitrary::{Arbitrary, Unstructured};
32907        let mut buf = [0u8; 1024];
32908        rng.fill_bytes(&mut buf);
32909        let mut unstructured = Unstructured::new(&buf);
32910        Self::arbitrary(&mut unstructured).unwrap_or_default()
32911    }
32912}
32913impl Default for VIDEO_STREAM_STATUS_DATA {
32914    fn default() -> Self {
32915        Self::DEFAULT.clone()
32916    }
32917}
32918impl MessageData for VIDEO_STREAM_STATUS_DATA {
32919    type Message = MavMessage;
32920    const ID: u32 = 270u32;
32921    const NAME: &'static str = "VIDEO_STREAM_STATUS";
32922    const EXTRA_CRC: u8 = 59u8;
32923    const ENCODED_LEN: usize = 20usize;
32924    fn deser(
32925        _version: MavlinkVersion,
32926        __input: &[u8],
32927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32928        let avail_len = __input.len();
32929        let mut payload_buf = [0; Self::ENCODED_LEN];
32930        let mut buf = if avail_len < Self::ENCODED_LEN {
32931            payload_buf[0..avail_len].copy_from_slice(__input);
32932            Bytes::new(&payload_buf)
32933        } else {
32934            Bytes::new(__input)
32935        };
32936        let mut __struct = Self::default();
32937        __struct.framerate = buf.get_f32_le();
32938        __struct.bitrate = buf.get_u32_le();
32939        let tmp = buf.get_u16_le();
32940        __struct.flags = VideoStreamStatusFlags::from_bits(
32941            tmp & VideoStreamStatusFlags::all().bits(),
32942        )
32943        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32944            flag_type: "VideoStreamStatusFlags",
32945            value: tmp as u32,
32946        })?;
32947        __struct.resolution_h = buf.get_u16_le();
32948        __struct.resolution_v = buf.get_u16_le();
32949        __struct.rotation = buf.get_u16_le();
32950        __struct.hfov = buf.get_u16_le();
32951        __struct.stream_id = buf.get_u8();
32952        __struct.camera_device_id = buf.get_u8();
32953        Ok(__struct)
32954    }
32955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32956        let mut __tmp = BytesMut::new(bytes);
32957        #[allow(clippy::absurd_extreme_comparisons)]
32958        #[allow(unused_comparisons)]
32959        if __tmp.remaining() < Self::ENCODED_LEN {
32960            panic!(
32961                "buffer is too small (need {} bytes, but got {})",
32962                Self::ENCODED_LEN,
32963                __tmp.remaining(),
32964            )
32965        }
32966        __tmp.put_f32_le(self.framerate);
32967        __tmp.put_u32_le(self.bitrate);
32968        __tmp.put_u16_le(self.flags.bits());
32969        __tmp.put_u16_le(self.resolution_h);
32970        __tmp.put_u16_le(self.resolution_v);
32971        __tmp.put_u16_le(self.rotation);
32972        __tmp.put_u16_le(self.hfov);
32973        __tmp.put_u8(self.stream_id);
32974        if matches!(version, MavlinkVersion::V2) {
32975            __tmp.put_u8(self.camera_device_id);
32976            let len = __tmp.len();
32977            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32978        } else {
32979            __tmp.len()
32980        }
32981    }
32982}
32983#[doc = "Local position/attitude estimate from a vision source."]
32984#[doc = ""]
32985#[doc = "ID: 102"]
32986#[derive(Debug, Clone, PartialEq)]
32987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32989#[cfg_attr(feature = "ts", derive(TS))]
32990#[cfg_attr(feature = "ts", ts(export))]
32991pub struct VISION_POSITION_ESTIMATE_DATA {
32992    #[doc = "Timestamp (UNIX time or time since system boot)"]
32993    pub usec: u64,
32994    #[doc = "Local X position"]
32995    pub x: f32,
32996    #[doc = "Local Y position"]
32997    pub y: f32,
32998    #[doc = "Local Z position"]
32999    pub z: f32,
33000    #[doc = "Roll angle"]
33001    pub roll: f32,
33002    #[doc = "Pitch angle"]
33003    pub pitch: f32,
33004    #[doc = "Yaw angle"]
33005    pub yaw: f32,
33006    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33007    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33010    pub covariance: [f32; 21],
33011    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33012    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33013    pub reset_counter: u8,
33014}
33015impl VISION_POSITION_ESTIMATE_DATA {
33016    pub const ENCODED_LEN: usize = 117usize;
33017    pub const DEFAULT: Self = Self {
33018        usec: 0_u64,
33019        x: 0.0_f32,
33020        y: 0.0_f32,
33021        z: 0.0_f32,
33022        roll: 0.0_f32,
33023        pitch: 0.0_f32,
33024        yaw: 0.0_f32,
33025        covariance: [0.0_f32; 21usize],
33026        reset_counter: 0_u8,
33027    };
33028    #[cfg(feature = "arbitrary")]
33029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33030        use arbitrary::{Arbitrary, Unstructured};
33031        let mut buf = [0u8; 1024];
33032        rng.fill_bytes(&mut buf);
33033        let mut unstructured = Unstructured::new(&buf);
33034        Self::arbitrary(&mut unstructured).unwrap_or_default()
33035    }
33036}
33037impl Default for VISION_POSITION_ESTIMATE_DATA {
33038    fn default() -> Self {
33039        Self::DEFAULT.clone()
33040    }
33041}
33042impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33043    type Message = MavMessage;
33044    const ID: u32 = 102u32;
33045    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33046    const EXTRA_CRC: u8 = 158u8;
33047    const ENCODED_LEN: usize = 117usize;
33048    fn deser(
33049        _version: MavlinkVersion,
33050        __input: &[u8],
33051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33052        let avail_len = __input.len();
33053        let mut payload_buf = [0; Self::ENCODED_LEN];
33054        let mut buf = if avail_len < Self::ENCODED_LEN {
33055            payload_buf[0..avail_len].copy_from_slice(__input);
33056            Bytes::new(&payload_buf)
33057        } else {
33058            Bytes::new(__input)
33059        };
33060        let mut __struct = Self::default();
33061        __struct.usec = buf.get_u64_le();
33062        __struct.x = buf.get_f32_le();
33063        __struct.y = buf.get_f32_le();
33064        __struct.z = buf.get_f32_le();
33065        __struct.roll = buf.get_f32_le();
33066        __struct.pitch = buf.get_f32_le();
33067        __struct.yaw = buf.get_f32_le();
33068        for v in &mut __struct.covariance {
33069            let val = buf.get_f32_le();
33070            *v = val;
33071        }
33072        __struct.reset_counter = buf.get_u8();
33073        Ok(__struct)
33074    }
33075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33076        let mut __tmp = BytesMut::new(bytes);
33077        #[allow(clippy::absurd_extreme_comparisons)]
33078        #[allow(unused_comparisons)]
33079        if __tmp.remaining() < Self::ENCODED_LEN {
33080            panic!(
33081                "buffer is too small (need {} bytes, but got {})",
33082                Self::ENCODED_LEN,
33083                __tmp.remaining(),
33084            )
33085        }
33086        __tmp.put_u64_le(self.usec);
33087        __tmp.put_f32_le(self.x);
33088        __tmp.put_f32_le(self.y);
33089        __tmp.put_f32_le(self.z);
33090        __tmp.put_f32_le(self.roll);
33091        __tmp.put_f32_le(self.pitch);
33092        __tmp.put_f32_le(self.yaw);
33093        if matches!(version, MavlinkVersion::V2) {
33094            for val in &self.covariance {
33095                __tmp.put_f32_le(*val);
33096            }
33097            __tmp.put_u8(self.reset_counter);
33098            let len = __tmp.len();
33099            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33100        } else {
33101            __tmp.len()
33102        }
33103    }
33104}
33105#[doc = "Speed estimate from a vision source."]
33106#[doc = ""]
33107#[doc = "ID: 103"]
33108#[derive(Debug, Clone, PartialEq)]
33109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33111#[cfg_attr(feature = "ts", derive(TS))]
33112#[cfg_attr(feature = "ts", ts(export))]
33113pub struct VISION_SPEED_ESTIMATE_DATA {
33114    #[doc = "Timestamp (UNIX time or time since system boot)"]
33115    pub usec: u64,
33116    #[doc = "Global X speed"]
33117    pub x: f32,
33118    #[doc = "Global Y speed"]
33119    pub y: f32,
33120    #[doc = "Global Z speed"]
33121    pub z: f32,
33122    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33123    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33124    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33125    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33126    pub covariance: [f32; 9],
33127    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33128    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33129    pub reset_counter: u8,
33130}
33131impl VISION_SPEED_ESTIMATE_DATA {
33132    pub const ENCODED_LEN: usize = 57usize;
33133    pub const DEFAULT: Self = Self {
33134        usec: 0_u64,
33135        x: 0.0_f32,
33136        y: 0.0_f32,
33137        z: 0.0_f32,
33138        covariance: [0.0_f32; 9usize],
33139        reset_counter: 0_u8,
33140    };
33141    #[cfg(feature = "arbitrary")]
33142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33143        use arbitrary::{Arbitrary, Unstructured};
33144        let mut buf = [0u8; 1024];
33145        rng.fill_bytes(&mut buf);
33146        let mut unstructured = Unstructured::new(&buf);
33147        Self::arbitrary(&mut unstructured).unwrap_or_default()
33148    }
33149}
33150impl Default for VISION_SPEED_ESTIMATE_DATA {
33151    fn default() -> Self {
33152        Self::DEFAULT.clone()
33153    }
33154}
33155impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33156    type Message = MavMessage;
33157    const ID: u32 = 103u32;
33158    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33159    const EXTRA_CRC: u8 = 208u8;
33160    const ENCODED_LEN: usize = 57usize;
33161    fn deser(
33162        _version: MavlinkVersion,
33163        __input: &[u8],
33164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33165        let avail_len = __input.len();
33166        let mut payload_buf = [0; Self::ENCODED_LEN];
33167        let mut buf = if avail_len < Self::ENCODED_LEN {
33168            payload_buf[0..avail_len].copy_from_slice(__input);
33169            Bytes::new(&payload_buf)
33170        } else {
33171            Bytes::new(__input)
33172        };
33173        let mut __struct = Self::default();
33174        __struct.usec = buf.get_u64_le();
33175        __struct.x = buf.get_f32_le();
33176        __struct.y = buf.get_f32_le();
33177        __struct.z = buf.get_f32_le();
33178        for v in &mut __struct.covariance {
33179            let val = buf.get_f32_le();
33180            *v = val;
33181        }
33182        __struct.reset_counter = buf.get_u8();
33183        Ok(__struct)
33184    }
33185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33186        let mut __tmp = BytesMut::new(bytes);
33187        #[allow(clippy::absurd_extreme_comparisons)]
33188        #[allow(unused_comparisons)]
33189        if __tmp.remaining() < Self::ENCODED_LEN {
33190            panic!(
33191                "buffer is too small (need {} bytes, but got {})",
33192                Self::ENCODED_LEN,
33193                __tmp.remaining(),
33194            )
33195        }
33196        __tmp.put_u64_le(self.usec);
33197        __tmp.put_f32_le(self.x);
33198        __tmp.put_f32_le(self.y);
33199        __tmp.put_f32_le(self.z);
33200        if matches!(version, MavlinkVersion::V2) {
33201            for val in &self.covariance {
33202                __tmp.put_f32_le(*val);
33203            }
33204            __tmp.put_u8(self.reset_counter);
33205            let len = __tmp.len();
33206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33207        } else {
33208            __tmp.len()
33209        }
33210    }
33211}
33212#[doc = "Cumulative distance traveled for each reported wheel."]
33213#[doc = ""]
33214#[doc = "ID: 9000"]
33215#[derive(Debug, Clone, PartialEq)]
33216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33218#[cfg_attr(feature = "ts", derive(TS))]
33219#[cfg_attr(feature = "ts", ts(export))]
33220pub struct WHEEL_DISTANCE_DATA {
33221    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33222    pub time_usec: u64,
33223    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33225    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33226    pub distance: [f64; 16],
33227    #[doc = "Number of wheels reported."]
33228    pub count: u8,
33229}
33230impl WHEEL_DISTANCE_DATA {
33231    pub const ENCODED_LEN: usize = 137usize;
33232    pub const DEFAULT: Self = Self {
33233        time_usec: 0_u64,
33234        distance: [0.0_f64; 16usize],
33235        count: 0_u8,
33236    };
33237    #[cfg(feature = "arbitrary")]
33238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33239        use arbitrary::{Arbitrary, Unstructured};
33240        let mut buf = [0u8; 1024];
33241        rng.fill_bytes(&mut buf);
33242        let mut unstructured = Unstructured::new(&buf);
33243        Self::arbitrary(&mut unstructured).unwrap_or_default()
33244    }
33245}
33246impl Default for WHEEL_DISTANCE_DATA {
33247    fn default() -> Self {
33248        Self::DEFAULT.clone()
33249    }
33250}
33251impl MessageData for WHEEL_DISTANCE_DATA {
33252    type Message = MavMessage;
33253    const ID: u32 = 9000u32;
33254    const NAME: &'static str = "WHEEL_DISTANCE";
33255    const EXTRA_CRC: u8 = 113u8;
33256    const ENCODED_LEN: usize = 137usize;
33257    fn deser(
33258        _version: MavlinkVersion,
33259        __input: &[u8],
33260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33261        let avail_len = __input.len();
33262        let mut payload_buf = [0; Self::ENCODED_LEN];
33263        let mut buf = if avail_len < Self::ENCODED_LEN {
33264            payload_buf[0..avail_len].copy_from_slice(__input);
33265            Bytes::new(&payload_buf)
33266        } else {
33267            Bytes::new(__input)
33268        };
33269        let mut __struct = Self::default();
33270        __struct.time_usec = buf.get_u64_le();
33271        for v in &mut __struct.distance {
33272            let val = buf.get_f64_le();
33273            *v = val;
33274        }
33275        __struct.count = buf.get_u8();
33276        Ok(__struct)
33277    }
33278    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33279        let mut __tmp = BytesMut::new(bytes);
33280        #[allow(clippy::absurd_extreme_comparisons)]
33281        #[allow(unused_comparisons)]
33282        if __tmp.remaining() < Self::ENCODED_LEN {
33283            panic!(
33284                "buffer is too small (need {} bytes, but got {})",
33285                Self::ENCODED_LEN,
33286                __tmp.remaining(),
33287            )
33288        }
33289        __tmp.put_u64_le(self.time_usec);
33290        for val in &self.distance {
33291            __tmp.put_f64_le(*val);
33292        }
33293        __tmp.put_u8(self.count);
33294        if matches!(version, MavlinkVersion::V2) {
33295            let len = __tmp.len();
33296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33297        } else {
33298            __tmp.len()
33299        }
33300    }
33301}
33302#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33303#[doc = ""]
33304#[doc = "ID: 299"]
33305#[derive(Debug, Clone, PartialEq)]
33306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33308#[cfg_attr(feature = "ts", derive(TS))]
33309#[cfg_attr(feature = "ts", ts(export))]
33310pub struct WIFI_CONFIG_AP_DATA {
33311    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33312    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33313    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33314    pub ssid: [u8; 32],
33315    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33316    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33317    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33318    pub password: [u8; 64],
33319    #[doc = "WiFi Mode."]
33320    #[cfg_attr(feature = "serde", serde(default))]
33321    pub mode: WifiConfigApMode,
33322    #[doc = "Message acceptance response (sent back to GS)."]
33323    #[cfg_attr(feature = "serde", serde(default))]
33324    pub response: WifiConfigApResponse,
33325}
33326impl WIFI_CONFIG_AP_DATA {
33327    pub const ENCODED_LEN: usize = 98usize;
33328    pub const DEFAULT: Self = Self {
33329        ssid: [0_u8; 32usize],
33330        password: [0_u8; 64usize],
33331        mode: WifiConfigApMode::DEFAULT,
33332        response: WifiConfigApResponse::DEFAULT,
33333    };
33334    #[cfg(feature = "arbitrary")]
33335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33336        use arbitrary::{Arbitrary, Unstructured};
33337        let mut buf = [0u8; 1024];
33338        rng.fill_bytes(&mut buf);
33339        let mut unstructured = Unstructured::new(&buf);
33340        Self::arbitrary(&mut unstructured).unwrap_or_default()
33341    }
33342}
33343impl Default for WIFI_CONFIG_AP_DATA {
33344    fn default() -> Self {
33345        Self::DEFAULT.clone()
33346    }
33347}
33348impl MessageData for WIFI_CONFIG_AP_DATA {
33349    type Message = MavMessage;
33350    const ID: u32 = 299u32;
33351    const NAME: &'static str = "WIFI_CONFIG_AP";
33352    const EXTRA_CRC: u8 = 19u8;
33353    const ENCODED_LEN: usize = 98usize;
33354    fn deser(
33355        _version: MavlinkVersion,
33356        __input: &[u8],
33357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33358        let avail_len = __input.len();
33359        let mut payload_buf = [0; Self::ENCODED_LEN];
33360        let mut buf = if avail_len < Self::ENCODED_LEN {
33361            payload_buf[0..avail_len].copy_from_slice(__input);
33362            Bytes::new(&payload_buf)
33363        } else {
33364            Bytes::new(__input)
33365        };
33366        let mut __struct = Self::default();
33367        for v in &mut __struct.ssid {
33368            let val = buf.get_u8();
33369            *v = val;
33370        }
33371        for v in &mut __struct.password {
33372            let val = buf.get_u8();
33373            *v = val;
33374        }
33375        let tmp = buf.get_i8();
33376        __struct.mode =
33377            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33378                enum_type: "WifiConfigApMode",
33379                value: tmp as u32,
33380            })?;
33381        let tmp = buf.get_i8();
33382        __struct.response =
33383            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33384                enum_type: "WifiConfigApResponse",
33385                value: tmp as u32,
33386            })?;
33387        Ok(__struct)
33388    }
33389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33390        let mut __tmp = BytesMut::new(bytes);
33391        #[allow(clippy::absurd_extreme_comparisons)]
33392        #[allow(unused_comparisons)]
33393        if __tmp.remaining() < Self::ENCODED_LEN {
33394            panic!(
33395                "buffer is too small (need {} bytes, but got {})",
33396                Self::ENCODED_LEN,
33397                __tmp.remaining(),
33398            )
33399        }
33400        for val in &self.ssid {
33401            __tmp.put_u8(*val);
33402        }
33403        for val in &self.password {
33404            __tmp.put_u8(*val);
33405        }
33406        if matches!(version, MavlinkVersion::V2) {
33407            __tmp.put_i8(self.mode as i8);
33408            __tmp.put_i8(self.response as i8);
33409            let len = __tmp.len();
33410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33411        } else {
33412            __tmp.len()
33413        }
33414    }
33415}
33416#[doc = "Winch status."]
33417#[doc = ""]
33418#[doc = "ID: 9005"]
33419#[derive(Debug, Clone, PartialEq)]
33420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33422#[cfg_attr(feature = "ts", derive(TS))]
33423#[cfg_attr(feature = "ts", ts(export))]
33424pub struct WINCH_STATUS_DATA {
33425    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33426    pub time_usec: u64,
33427    #[doc = "Length of line released. NaN if unknown"]
33428    pub line_length: f32,
33429    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
33430    pub speed: f32,
33431    #[doc = "Tension on the line. NaN if unknown"]
33432    pub tension: f32,
33433    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
33434    pub voltage: f32,
33435    #[doc = "Current draw from the winch. NaN if unknown"]
33436    pub current: f32,
33437    #[doc = "Status flags"]
33438    pub status: MavWinchStatusFlag,
33439    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
33440    pub temperature: i16,
33441}
33442impl WINCH_STATUS_DATA {
33443    pub const ENCODED_LEN: usize = 34usize;
33444    pub const DEFAULT: Self = Self {
33445        time_usec: 0_u64,
33446        line_length: 0.0_f32,
33447        speed: 0.0_f32,
33448        tension: 0.0_f32,
33449        voltage: 0.0_f32,
33450        current: 0.0_f32,
33451        status: MavWinchStatusFlag::DEFAULT,
33452        temperature: 0_i16,
33453    };
33454    #[cfg(feature = "arbitrary")]
33455    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33456        use arbitrary::{Arbitrary, Unstructured};
33457        let mut buf = [0u8; 1024];
33458        rng.fill_bytes(&mut buf);
33459        let mut unstructured = Unstructured::new(&buf);
33460        Self::arbitrary(&mut unstructured).unwrap_or_default()
33461    }
33462}
33463impl Default for WINCH_STATUS_DATA {
33464    fn default() -> Self {
33465        Self::DEFAULT.clone()
33466    }
33467}
33468impl MessageData for WINCH_STATUS_DATA {
33469    type Message = MavMessage;
33470    const ID: u32 = 9005u32;
33471    const NAME: &'static str = "WINCH_STATUS";
33472    const EXTRA_CRC: u8 = 117u8;
33473    const ENCODED_LEN: usize = 34usize;
33474    fn deser(
33475        _version: MavlinkVersion,
33476        __input: &[u8],
33477    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33478        let avail_len = __input.len();
33479        let mut payload_buf = [0; Self::ENCODED_LEN];
33480        let mut buf = if avail_len < Self::ENCODED_LEN {
33481            payload_buf[0..avail_len].copy_from_slice(__input);
33482            Bytes::new(&payload_buf)
33483        } else {
33484            Bytes::new(__input)
33485        };
33486        let mut __struct = Self::default();
33487        __struct.time_usec = buf.get_u64_le();
33488        __struct.line_length = buf.get_f32_le();
33489        __struct.speed = buf.get_f32_le();
33490        __struct.tension = buf.get_f32_le();
33491        __struct.voltage = buf.get_f32_le();
33492        __struct.current = buf.get_f32_le();
33493        let tmp = buf.get_u32_le();
33494        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
33495            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33496                flag_type: "MavWinchStatusFlag",
33497                value: tmp as u32,
33498            })?;
33499        __struct.temperature = buf.get_i16_le();
33500        Ok(__struct)
33501    }
33502    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33503        let mut __tmp = BytesMut::new(bytes);
33504        #[allow(clippy::absurd_extreme_comparisons)]
33505        #[allow(unused_comparisons)]
33506        if __tmp.remaining() < Self::ENCODED_LEN {
33507            panic!(
33508                "buffer is too small (need {} bytes, but got {})",
33509                Self::ENCODED_LEN,
33510                __tmp.remaining(),
33511            )
33512        }
33513        __tmp.put_u64_le(self.time_usec);
33514        __tmp.put_f32_le(self.line_length);
33515        __tmp.put_f32_le(self.speed);
33516        __tmp.put_f32_le(self.tension);
33517        __tmp.put_f32_le(self.voltage);
33518        __tmp.put_f32_le(self.current);
33519        __tmp.put_u32_le(self.status.bits());
33520        __tmp.put_i16_le(self.temperature);
33521        if matches!(version, MavlinkVersion::V2) {
33522            let len = __tmp.len();
33523            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33524        } else {
33525            __tmp.len()
33526        }
33527    }
33528}
33529#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33530#[doc = ""]
33531#[doc = "ID: 231"]
33532#[derive(Debug, Clone, PartialEq)]
33533#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33535#[cfg_attr(feature = "ts", derive(TS))]
33536#[cfg_attr(feature = "ts", ts(export))]
33537pub struct WIND_COV_DATA {
33538    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33539    pub time_usec: u64,
33540    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
33541    pub wind_x: f32,
33542    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
33543    pub wind_y: f32,
33544    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
33545    pub wind_z: f32,
33546    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33547    pub var_horiz: f32,
33548    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33549    pub var_vert: f32,
33550    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
33551    pub wind_alt: f32,
33552    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
33553    pub horiz_accuracy: f32,
33554    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
33555    pub vert_accuracy: f32,
33556}
33557impl WIND_COV_DATA {
33558    pub const ENCODED_LEN: usize = 40usize;
33559    pub const DEFAULT: Self = Self {
33560        time_usec: 0_u64,
33561        wind_x: 0.0_f32,
33562        wind_y: 0.0_f32,
33563        wind_z: 0.0_f32,
33564        var_horiz: 0.0_f32,
33565        var_vert: 0.0_f32,
33566        wind_alt: 0.0_f32,
33567        horiz_accuracy: 0.0_f32,
33568        vert_accuracy: 0.0_f32,
33569    };
33570    #[cfg(feature = "arbitrary")]
33571    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33572        use arbitrary::{Arbitrary, Unstructured};
33573        let mut buf = [0u8; 1024];
33574        rng.fill_bytes(&mut buf);
33575        let mut unstructured = Unstructured::new(&buf);
33576        Self::arbitrary(&mut unstructured).unwrap_or_default()
33577    }
33578}
33579impl Default for WIND_COV_DATA {
33580    fn default() -> Self {
33581        Self::DEFAULT.clone()
33582    }
33583}
33584impl MessageData for WIND_COV_DATA {
33585    type Message = MavMessage;
33586    const ID: u32 = 231u32;
33587    const NAME: &'static str = "WIND_COV";
33588    const EXTRA_CRC: u8 = 105u8;
33589    const ENCODED_LEN: usize = 40usize;
33590    fn deser(
33591        _version: MavlinkVersion,
33592        __input: &[u8],
33593    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33594        let avail_len = __input.len();
33595        let mut payload_buf = [0; Self::ENCODED_LEN];
33596        let mut buf = if avail_len < Self::ENCODED_LEN {
33597            payload_buf[0..avail_len].copy_from_slice(__input);
33598            Bytes::new(&payload_buf)
33599        } else {
33600            Bytes::new(__input)
33601        };
33602        let mut __struct = Self::default();
33603        __struct.time_usec = buf.get_u64_le();
33604        __struct.wind_x = buf.get_f32_le();
33605        __struct.wind_y = buf.get_f32_le();
33606        __struct.wind_z = buf.get_f32_le();
33607        __struct.var_horiz = buf.get_f32_le();
33608        __struct.var_vert = buf.get_f32_le();
33609        __struct.wind_alt = buf.get_f32_le();
33610        __struct.horiz_accuracy = buf.get_f32_le();
33611        __struct.vert_accuracy = buf.get_f32_le();
33612        Ok(__struct)
33613    }
33614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33615        let mut __tmp = BytesMut::new(bytes);
33616        #[allow(clippy::absurd_extreme_comparisons)]
33617        #[allow(unused_comparisons)]
33618        if __tmp.remaining() < Self::ENCODED_LEN {
33619            panic!(
33620                "buffer is too small (need {} bytes, but got {})",
33621                Self::ENCODED_LEN,
33622                __tmp.remaining(),
33623            )
33624        }
33625        __tmp.put_u64_le(self.time_usec);
33626        __tmp.put_f32_le(self.wind_x);
33627        __tmp.put_f32_le(self.wind_y);
33628        __tmp.put_f32_le(self.wind_z);
33629        __tmp.put_f32_le(self.var_horiz);
33630        __tmp.put_f32_le(self.var_vert);
33631        __tmp.put_f32_le(self.wind_alt);
33632        __tmp.put_f32_le(self.horiz_accuracy);
33633        __tmp.put_f32_le(self.vert_accuracy);
33634        if matches!(version, MavlinkVersion::V2) {
33635            let len = __tmp.len();
33636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33637        } else {
33638            __tmp.len()
33639        }
33640    }
33641}
33642#[derive(Clone, PartialEq, Debug)]
33643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33644#[cfg_attr(feature = "serde", serde(tag = "type"))]
33645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33646#[cfg_attr(feature = "ts", derive(TS))]
33647#[cfg_attr(feature = "ts", ts(export))]
33648#[repr(u32)]
33649pub enum MavMessage {
33650    #[doc = "Set the vehicle attitude and body angular rates."]
33651    #[doc = ""]
33652    #[doc = "ID: 140"]
33653    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33654    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
33655    #[doc = ""]
33656    #[doc = "ID: 375"]
33657    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33658    #[doc = "The location and information of an ADSB vehicle."]
33659    #[doc = ""]
33660    #[doc = "ID: 246"]
33661    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33662    #[doc = "Airspeed information from a sensor."]
33663    #[doc = ""]
33664    #[doc = "ID: 295"]
33665    AIRSPEED(AIRSPEED_DATA),
33666    #[doc = "The location and information of an AIS vessel."]
33667    #[doc = ""]
33668    #[doc = "ID: 301"]
33669    AIS_VESSEL(AIS_VESSEL_DATA),
33670    #[doc = "The current system altitude."]
33671    #[doc = ""]
33672    #[doc = "ID: 141"]
33673    ALTITUDE(ALTITUDE_DATA),
33674    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
33675    #[doc = ""]
33676    #[doc = "ID: 30"]
33677    ATTITUDE(ATTITUDE_DATA),
33678    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33679    #[doc = ""]
33680    #[doc = "ID: 31"]
33681    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33682    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33683    #[doc = ""]
33684    #[doc = "ID: 61"]
33685    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33686    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
33687    #[doc = ""]
33688    #[doc = "ID: 83"]
33689    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33690    #[doc = "Motion capture attitude and position."]
33691    #[doc = ""]
33692    #[doc = "ID: 138"]
33693    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33694    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
33695    #[doc = ""]
33696    #[doc = "ID: 7"]
33697    AUTH_KEY(AUTH_KEY_DATA),
33698    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
33699    #[doc = ""]
33700    #[doc = "ID: 286"]
33701    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33702    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
33703    #[doc = ""]
33704    #[doc = "ID: 148"]
33705    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33706    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
33707    #[doc = ""]
33708    #[doc = "ID: 435"]
33709    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33710    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
33711    #[doc = ""]
33712    #[doc = "ID: 437"]
33713    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33714    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
33715    #[doc = ""]
33716    #[doc = "ID: 372"]
33717    BATTERY_INFO(BATTERY_INFO_DATA),
33718    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
33719    #[doc = ""]
33720    #[doc = "ID: 147"]
33721    BATTERY_STATUS(BATTERY_STATUS_DATA),
33722    #[doc = "Battery dynamic information.         This should be streamed (nominally at 1Hz).         Static/invariant battery information is sent in BATTERY_INFO.         Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full.         Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on."]
33723    #[doc = ""]
33724    #[doc = "ID: 369"]
33725    BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA),
33726    #[doc = "Report button state change."]
33727    #[doc = ""]
33728    #[doc = "ID: 257"]
33729    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33730    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33731    #[doc = ""]
33732    #[doc = "ID: 262"]
33733    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33734    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33735    #[doc = ""]
33736    #[doc = "ID: 271"]
33737    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33738    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
33739    #[doc = ""]
33740    #[doc = "ID: 263"]
33741    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33742    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33743    #[doc = ""]
33744    #[doc = "ID: 259"]
33745    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33746    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33747    #[doc = ""]
33748    #[doc = "ID: 260"]
33749    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33750    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
33751    #[doc = ""]
33752    #[doc = "ID: 277"]
33753    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33754    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33755    #[doc = ""]
33756    #[doc = "ID: 276"]
33757    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33758    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33759    #[doc = ""]
33760    #[doc = "ID: 275"]
33761    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33762    #[doc = "Camera-IMU triggering and synchronisation message."]
33763    #[doc = ""]
33764    #[doc = "ID: 112"]
33765    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33766    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
33767    #[doc = ""]
33768    #[doc = "ID: 387"]
33769    CANFD_FRAME(CANFD_FRAME_DATA),
33770    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
33771    #[doc = ""]
33772    #[doc = "ID: 388"]
33773    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33774    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
33775    #[doc = ""]
33776    #[doc = "ID: 386"]
33777    CAN_FRAME(CAN_FRAME_DATA),
33778    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33779    #[doc = ""]
33780    #[doc = "ID: 336"]
33781    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33782    #[doc = "Report current used cellular network status."]
33783    #[doc = ""]
33784    #[doc = "ID: 334"]
33785    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33786    #[doc = "Request to control this MAV."]
33787    #[doc = ""]
33788    #[doc = "ID: 5"]
33789    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33790    #[doc = "Accept / deny control of this MAV."]
33791    #[doc = ""]
33792    #[doc = "ID: 6"]
33793    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33794    #[doc = "Information about a potential collision."]
33795    #[doc = ""]
33796    #[doc = "ID: 247"]
33797    COLLISION(COLLISION_DATA),
33798    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33799    #[doc = ""]
33800    #[doc = "ID: 77"]
33801    COMMAND_ACK(COMMAND_ACK_DATA),
33802    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33803    #[doc = ""]
33804    #[doc = "ID: 80"]
33805    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33806    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33807    #[doc = ""]
33808    #[doc = "ID: 75"]
33809    COMMAND_INT(COMMAND_INT_DATA),
33810    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33811    #[doc = ""]
33812    #[doc = "ID: 76"]
33813    COMMAND_LONG(COMMAND_LONG_DATA),
33814    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
33815    #[doc = ""]
33816    #[doc = "ID: 395"]
33817    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33818    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33819    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
33820    #[doc = ""]
33821    #[doc = "ID: 396"]
33822    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33823    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
33824    #[doc = ""]
33825    #[doc = "ID: 397"]
33826    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33827    #[doc = "Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL."]
33828    #[doc = ""]
33829    #[doc = "ID: 512"]
33830    CONTROL_STATUS(CONTROL_STATUS_DATA),
33831    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
33832    #[doc = ""]
33833    #[doc = "ID: 146"]
33834    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33835    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
33836    #[doc = ""]
33837    #[doc = "ID: 411"]
33838    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33839    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
33840    #[doc = ""]
33841    #[doc = "ID: 436"]
33842    CURRENT_MODE(CURRENT_MODE_DATA),
33843    #[doc = "Data stream status information."]
33844    #[doc = ""]
33845    #[doc = "ID: 67"]
33846    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33847    DATA_STREAM(DATA_STREAM_DATA),
33848    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33849    #[doc = ""]
33850    #[doc = "ID: 130"]
33851    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33852    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
33853    #[doc = ""]
33854    #[doc = "ID: 254"]
33855    DEBUG(DEBUG_DATA),
33856    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
33857    #[doc = ""]
33858    #[doc = "ID: 350"]
33859    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33860    #[doc = "To debug something using a named 3D vector."]
33861    #[doc = ""]
33862    #[doc = "ID: 250"]
33863    DEBUG_VECT(DEBUG_VECT_DATA),
33864    #[doc = "Distance sensor information for an onboard rangefinder."]
33865    #[doc = ""]
33866    #[doc = "ID: 132"]
33867    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33868    #[doc = "EFI status output."]
33869    #[doc = ""]
33870    #[doc = "ID: 225"]
33871    EFI_STATUS(EFI_STATUS_DATA),
33872    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33873    #[doc = ""]
33874    #[doc = "ID: 131"]
33875    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33876    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
33877    #[doc = ""]
33878    #[doc = "ID: 290"]
33879    ESC_INFO(ESC_INFO_DATA),
33880    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
33881    #[doc = ""]
33882    #[doc = "ID: 291"]
33883    ESC_STATUS(ESC_STATUS_DATA),
33884    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
33885    #[doc = ""]
33886    #[doc = "ID: 230"]
33887    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33888    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
33889    #[doc = ""]
33890    #[doc = "ID: 410"]
33891    EVENT(EVENT_DATA),
33892    #[doc = "Provides state for additional features."]
33893    #[doc = ""]
33894    #[doc = "ID: 245"]
33895    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33896    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
33897    #[doc = ""]
33898    #[doc = "ID: 162"]
33899    FENCE_STATUS(FENCE_STATUS_DATA),
33900    #[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT).         This may typically send at low rates: of the order of 2Hz."]
33901    #[doc = ""]
33902    #[doc = "ID: 361"]
33903    FIGURE_EIGHT_EXECUTION_STATUS(FIGURE_EIGHT_EXECUTION_STATUS_DATA),
33904    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
33905    #[doc = ""]
33906    #[doc = "ID: 110"]
33907    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33908    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
33909    #[doc = ""]
33910    #[doc = "ID: 264"]
33911    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33912    #[doc = "Current motion information from a designated system."]
33913    #[doc = ""]
33914    #[doc = "ID: 144"]
33915    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33916    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
33917    #[doc = ""]
33918    #[doc = "ID: 371"]
33919    FUEL_STATUS(FUEL_STATUS_DATA),
33920    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
33921    #[doc = ""]
33922    #[doc = "ID: 373"]
33923    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33924    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
33925    #[doc = ""]
33926    #[doc = "ID: 285"]
33927    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33928    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
33929    #[doc = ""]
33930    #[doc = "ID: 283"]
33931    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33932    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
33933    #[doc = ""]
33934    #[doc = "ID: 284"]
33935    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33936    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
33937    #[doc = ""]
33938    #[doc = "ID: 280"]
33939    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33940    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33941    #[doc = ""]
33942    #[doc = "ID: 282"]
33943    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33944    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33945    #[doc = ""]
33946    #[doc = "ID: 288"]
33947    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33948    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
33949    #[doc = ""]
33950    #[doc = "ID: 287"]
33951    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33952    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
33953    #[doc = ""]
33954    #[doc = "ID: 281"]
33955    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33956    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
33957    #[doc = ""]
33958    #[doc = "ID: 33"]
33959    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33960    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
33961    #[doc = ""]
33962    #[doc = "ID: 63"]
33963    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33964    #[doc = "Global position/attitude estimate from a vision source."]
33965    #[doc = ""]
33966    #[doc = "ID: 101"]
33967    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33968    #[doc = "Information about key components of GNSS receivers, like signal authentication, interference and system errors."]
33969    #[doc = ""]
33970    #[doc = "ID: 441"]
33971    GNSS_INTEGRITY(GNSS_INTEGRITY_DATA),
33972    #[doc = "Second GPS data."]
33973    #[doc = ""]
33974    #[doc = "ID: 124"]
33975    GPS2_RAW(GPS2_RAW_DATA),
33976    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33977    #[doc = ""]
33978    #[doc = "ID: 128"]
33979    GPS2_RTK(GPS2_RTK_DATA),
33980    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
33981    #[doc = ""]
33982    #[doc = "ID: 49"]
33983    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33984    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
33985    #[doc = ""]
33986    #[doc = "ID: 123"]
33987    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33988    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33989    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
33990    #[doc = ""]
33991    #[doc = "ID: 232"]
33992    GPS_INPUT(GPS_INPUT_DATA),
33993    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33994    #[doc = ""]
33995    #[doc = "ID: 24"]
33996    GPS_RAW_INT(GPS_RAW_INT_DATA),
33997    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
33998    #[doc = ""]
33999    #[doc = "ID: 233"]
34000    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34001    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34002    #[doc = ""]
34003    #[doc = "ID: 127"]
34004    GPS_RTK(GPS_RTK_DATA),
34005    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34006    #[doc = ""]
34007    #[doc = "ID: 25"]
34008    GPS_STATUS(GPS_STATUS_DATA),
34009    #[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_END."]
34010    #[doc = ""]
34011    #[doc = "ID: 415"]
34012    GROUP_END(GROUP_END_DATA),
34013    #[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_START."]
34014    #[doc = ""]
34015    #[doc = "ID: 414"]
34016    GROUP_START(GROUP_START_DATA),
34017    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34018    #[doc = ""]
34019    #[doc = "ID: 0"]
34020    HEARTBEAT(HEARTBEAT_DATA),
34021    #[doc = "The IMU readings in SI units in NED body frame."]
34022    #[doc = ""]
34023    #[doc = "ID: 105"]
34024    HIGHRES_IMU(HIGHRES_IMU_DATA),
34025    #[doc = "Message appropriate for high latency connections like Iridium."]
34026    #[doc = ""]
34027    #[doc = "ID: 234"]
34028    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34029    HIGH_LATENCY(HIGH_LATENCY_DATA),
34030    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34031    #[doc = ""]
34032    #[doc = "ID: 235"]
34033    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34034    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34035    #[doc = ""]
34036    #[doc = "ID: 93"]
34037    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34038    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34039    #[doc = ""]
34040    #[doc = "ID: 91"]
34041    HIL_CONTROLS(HIL_CONTROLS_DATA),
34042    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34043    #[doc = ""]
34044    #[doc = "ID: 113"]
34045    HIL_GPS(HIL_GPS_DATA),
34046    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34047    #[doc = ""]
34048    #[doc = "ID: 114"]
34049    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34050    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34051    #[doc = ""]
34052    #[doc = "ID: 92"]
34053    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34054    #[doc = "The IMU readings in SI units in NED body frame."]
34055    #[doc = ""]
34056    #[doc = "ID: 107"]
34057    HIL_SENSOR(HIL_SENSOR_DATA),
34058    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34059    #[doc = ""]
34060    #[doc = "ID: 90"]
34061    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34062    HIL_STATE(HIL_STATE_DATA),
34063    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34064    #[doc = ""]
34065    #[doc = "ID: 115"]
34066    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34067    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34068    #[doc = ""]
34069    #[doc = "ID: 242"]
34070    HOME_POSITION(HOME_POSITION_DATA),
34071    #[doc = "Temperature and humidity from hygrometer."]
34072    #[doc = ""]
34073    #[doc = "ID: 12920"]
34074    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34075    #[doc = "Illuminator status."]
34076    #[doc = ""]
34077    #[doc = "ID: 440"]
34078    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34079    #[doc = "Status of the Iridium SBD link."]
34080    #[doc = ""]
34081    #[doc = "ID: 335"]
34082    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34083    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34084    #[doc = ""]
34085    #[doc = "ID: 149"]
34086    LANDING_TARGET(LANDING_TARGET_DATA),
34087    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34088    #[doc = ""]
34089    #[doc = "ID: 8"]
34090    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34091    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34092    #[doc = ""]
34093    #[doc = "ID: 32"]
34094    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34095    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34096    #[doc = ""]
34097    #[doc = "ID: 64"]
34098    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34099    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34100    #[doc = ""]
34101    #[doc = "ID: 89"]
34102    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34103    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34104    #[doc = ""]
34105    #[doc = "ID: 268"]
34106    LOGGING_ACK(LOGGING_ACK_DATA),
34107    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34108    #[doc = ""]
34109    #[doc = "ID: 266"]
34110    LOGGING_DATA(LOGGING_DATA_DATA),
34111    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34112    #[doc = ""]
34113    #[doc = "ID: 267"]
34114    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34115    #[doc = "Reply to LOG_REQUEST_DATA."]
34116    #[doc = ""]
34117    #[doc = "ID: 120"]
34118    LOG_DATA(LOG_DATA_DATA),
34119    #[doc = "Reply to LOG_REQUEST_LIST."]
34120    #[doc = ""]
34121    #[doc = "ID: 118"]
34122    LOG_ENTRY(LOG_ENTRY_DATA),
34123    #[doc = "Erase all logs."]
34124    #[doc = ""]
34125    #[doc = "ID: 121"]
34126    LOG_ERASE(LOG_ERASE_DATA),
34127    #[doc = "Request a chunk of a log."]
34128    #[doc = ""]
34129    #[doc = "ID: 119"]
34130    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34131    #[doc = "Stop log transfer and resume normal logging."]
34132    #[doc = ""]
34133    #[doc = "ID: 122"]
34134    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34135    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34136    #[doc = ""]
34137    #[doc = "ID: 117"]
34138    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34139    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34140    #[doc = ""]
34141    #[doc = "ID: 192"]
34142    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34143    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34144    #[doc = ""]
34145    #[doc = "ID: 69"]
34146    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34147    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34148    #[doc = ""]
34149    #[doc = "ID: 81"]
34150    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34151    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34152    #[doc = ""]
34153    #[doc = "ID: 249"]
34154    MEMORY_VECT(MEMORY_VECT_DATA),
34155    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34156    #[doc = ""]
34157    #[doc = "ID: 244"]
34158    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34159    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34160    #[doc = ""]
34161    #[doc = "ID: 47"]
34162    MISSION_ACK(MISSION_ACK_DATA),
34163    #[doc = "Delete all mission items at once."]
34164    #[doc = ""]
34165    #[doc = "ID: 45"]
34166    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34167    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34168    #[doc = ""]
34169    #[doc = "ID: 44"]
34170    MISSION_COUNT(MISSION_COUNT_DATA),
34171    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34172    #[doc = ""]
34173    #[doc = "ID: 42"]
34174    MISSION_CURRENT(MISSION_CURRENT_DATA),
34175    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34176    #[doc = ""]
34177    #[doc = "ID: 39"]
34178    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34179    MISSION_ITEM(MISSION_ITEM_DATA),
34180    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34181    #[doc = ""]
34182    #[doc = "ID: 73"]
34183    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34184    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34185    #[doc = ""]
34186    #[doc = "ID: 46"]
34187    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34188    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34189    #[doc = ""]
34190    #[doc = "ID: 40"]
34191    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34192    MISSION_REQUEST(MISSION_REQUEST_DATA),
34193    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34194    #[doc = ""]
34195    #[doc = "ID: 51"]
34196    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34197    #[doc = "Request the overall list of mission items from the system/component."]
34198    #[doc = ""]
34199    #[doc = "ID: 43"]
34200    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34201    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34202    #[doc = ""]
34203    #[doc = "ID: 37"]
34204    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34205    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34206    #[doc = ""]
34207    #[doc = "ID: 41"]
34208    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34209    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34210    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34211    #[doc = ""]
34212    #[doc = "ID: 38"]
34213    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34214    #[doc = "Orientation of a mount."]
34215    #[doc = ""]
34216    #[doc = "ID: 265"]
34217    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34218    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34219    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34220    #[doc = ""]
34221    #[doc = "ID: 251"]
34222    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34223    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34224    #[doc = ""]
34225    #[doc = "ID: 252"]
34226    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34227    #[doc = "The state of the navigation and position controller."]
34228    #[doc = ""]
34229    #[doc = "ID: 62"]
34230    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34231    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34232    #[doc = ""]
34233    #[doc = "ID: 330"]
34234    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34235    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34236    #[doc = ""]
34237    #[doc = "ID: 331"]
34238    ODOMETRY(ODOMETRY_DATA),
34239    #[doc = "Hardware status sent by an onboard computer."]
34240    #[doc = ""]
34241    #[doc = "ID: 390"]
34242    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34243    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34244    #[doc = ""]
34245    #[doc = "ID: 12918"]
34246    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34247    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34248    #[doc = ""]
34249    #[doc = "ID: 12902"]
34250    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34251    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34252    #[doc = ""]
34253    #[doc = "ID: 12900"]
34254    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34255    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34256    #[doc = ""]
34257    #[doc = "ID: 12901"]
34258    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34259    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34260    #[doc = ""]
34261    #[doc = "ID: 12915"]
34262    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34263    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34264    #[doc = ""]
34265    #[doc = "ID: 12905"]
34266    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34267    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34268    #[doc = ""]
34269    #[doc = "ID: 12903"]
34270    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34271    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34272    #[doc = ""]
34273    #[doc = "ID: 12904"]
34274    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34275    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34276    #[doc = ""]
34277    #[doc = "ID: 12919"]
34278    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34279    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34280    #[doc = ""]
34281    #[doc = "ID: 100"]
34282    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34283    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34284    #[doc = ""]
34285    #[doc = "ID: 106"]
34286    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34287    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34288    #[doc = ""]
34289    #[doc = "ID: 360"]
34290    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34291    #[doc = "Response from a PARAM_EXT_SET message."]
34292    #[doc = ""]
34293    #[doc = "ID: 324"]
34294    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34295    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34296    #[doc = ""]
34297    #[doc = "ID: 321"]
34298    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34299    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34300    #[doc = ""]
34301    #[doc = "ID: 320"]
34302    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34303    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34304    #[doc = ""]
34305    #[doc = "ID: 323"]
34306    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34307    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34308    #[doc = ""]
34309    #[doc = "ID: 322"]
34310    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34311    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34312    #[doc = ""]
34313    #[doc = "ID: 50"]
34314    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34315    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34316    #[doc = ""]
34317    #[doc = "ID: 21"]
34318    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34319    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34320    #[doc = ""]
34321    #[doc = "ID: 20"]
34322    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34323    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34324    #[doc = ""]
34325    #[doc = "ID: 23"]
34326    PARAM_SET(PARAM_SET_DATA),
34327    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34328    #[doc = ""]
34329    #[doc = "ID: 22"]
34330    PARAM_VALUE(PARAM_VALUE_DATA),
34331    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34332    #[doc = ""]
34333    #[doc = "ID: 4"]
34334    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34335    PING(PING_DATA),
34336    #[doc = "Control vehicle tone generation (buzzer)."]
34337    #[doc = ""]
34338    #[doc = "ID: 258"]
34339    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34340    PLAY_TUNE(PLAY_TUNE_DATA),
34341    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34342    #[doc = ""]
34343    #[doc = "ID: 400"]
34344    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34345    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34346    #[doc = ""]
34347    #[doc = "ID: 87"]
34348    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34349    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34350    #[doc = ""]
34351    #[doc = "ID: 85"]
34352    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34353    #[doc = "Power supply status."]
34354    #[doc = ""]
34355    #[doc = "ID: 125"]
34356    POWER_STATUS(POWER_STATUS_DATA),
34357    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34358    #[doc = ""]
34359    #[doc = "ID: 300"]
34360    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34361    #[doc = "RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS).         Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller.         The target_system field should normally be set to the system id of the system to control, typically the flight controller.         The target_component field can normally be set to 0, so that all components of the system can receive the message.         The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field.         The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain.         The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled).         The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent).         The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost).         In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver).         For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data.         Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming."]
34362    #[doc = ""]
34363    #[doc = "ID: 420"]
34364    RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA),
34365    #[doc = "Status generated by radio and injected into MAVLink stream."]
34366    #[doc = ""]
34367    #[doc = "ID: 109"]
34368    RADIO_STATUS(RADIO_STATUS_DATA),
34369    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34370    #[doc = ""]
34371    #[doc = "ID: 27"]
34372    RAW_IMU(RAW_IMU_DATA),
34373    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34374    #[doc = ""]
34375    #[doc = "ID: 28"]
34376    RAW_PRESSURE(RAW_PRESSURE_DATA),
34377    #[doc = "RPM sensor data message."]
34378    #[doc = ""]
34379    #[doc = "ID: 339"]
34380    RAW_RPM(RAW_RPM_DATA),
34381    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34382    #[doc = ""]
34383    #[doc = "ID: 65"]
34384    RC_CHANNELS(RC_CHANNELS_DATA),
34385    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34386    #[doc = ""]
34387    #[doc = "ID: 70"]
34388    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34389    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34390    #[doc = ""]
34391    #[doc = "ID: 35"]
34392    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34393    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34394    #[doc = ""]
34395    #[doc = "ID: 34"]
34396    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34397    #[doc = "Request a data stream."]
34398    #[doc = ""]
34399    #[doc = "ID: 66"]
34400    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34401    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34402    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34403    #[doc = ""]
34404    #[doc = "ID: 412"]
34405    REQUEST_EVENT(REQUEST_EVENT_DATA),
34406    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34407    #[doc = ""]
34408    #[doc = "ID: 142"]
34409    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34410    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34411    #[doc = ""]
34412    #[doc = "ID: 413"]
34413    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34414    #[doc = "Read out the safety zone the MAV currently assumes."]
34415    #[doc = ""]
34416    #[doc = "ID: 55"]
34417    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34418    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
34419    #[doc = ""]
34420    #[doc = "ID: 54"]
34421    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
34422    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
34423    #[doc = ""]
34424    #[doc = "ID: 26"]
34425    SCALED_IMU(SCALED_IMU_DATA),
34426    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
34427    #[doc = ""]
34428    #[doc = "ID: 116"]
34429    SCALED_IMU2(SCALED_IMU2_DATA),
34430    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
34431    #[doc = ""]
34432    #[doc = "ID: 129"]
34433    SCALED_IMU3(SCALED_IMU3_DATA),
34434    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
34435    #[doc = ""]
34436    #[doc = "ID: 29"]
34437    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
34438    #[doc = "Barometer readings for 2nd barometer."]
34439    #[doc = ""]
34440    #[doc = "ID: 137"]
34441    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
34442    #[doc = "Barometer readings for 3rd barometer."]
34443    #[doc = ""]
34444    #[doc = "ID: 143"]
34445    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
34446    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
34447    #[doc = ""]
34448    #[doc = "ID: 126"]
34449    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
34450    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
34451    #[doc = ""]
34452    #[doc = "ID: 36"]
34453    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
34454    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
34455    #[doc = ""]
34456    #[doc = "ID: 256"]
34457    SETUP_SIGNING(SETUP_SIGNING_DATA),
34458    #[doc = "Set the vehicle attitude and body angular rates."]
34459    #[doc = ""]
34460    #[doc = "ID: 139"]
34461    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
34462    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
34463    #[doc = ""]
34464    #[doc = "ID: 82"]
34465    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
34466    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
34467    #[doc = ""]
34468    #[doc = "ID: 48"]
34469    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
34470    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
34471    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
34472    #[doc = ""]
34473    #[doc = "ID: 243"]
34474    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
34475    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
34476    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
34477    #[doc = ""]
34478    #[doc = "ID: 11"]
34479    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
34480    SET_MODE(SET_MODE_DATA),
34481    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
34482    #[doc = ""]
34483    #[doc = "ID: 86"]
34484    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
34485    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
34486    #[doc = ""]
34487    #[doc = "ID: 84"]
34488    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
34489    #[doc = "Set temporary maximum limits for horizontal speed, vertical speed and yaw rate.         The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set).         The consumer should latch the limits until a new limit is received or the mode is changed."]
34490    #[doc = ""]
34491    #[doc = "ID: 354"]
34492    SET_VELOCITY_LIMITS(SET_VELOCITY_LIMITS_DATA),
34493    #[doc = "Status of simulation environment, if used."]
34494    #[doc = ""]
34495    #[doc = "ID: 108"]
34496    SIM_STATE(SIM_STATE_DATA),
34497    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
34498    #[doc = ""]
34499    #[doc = "ID: 370"]
34500    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
34501    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
34502    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
34503    #[doc = ""]
34504    #[doc = "ID: 253"]
34505    STATUSTEXT(STATUSTEXT_DATA),
34506    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
34507    #[doc = ""]
34508    #[doc = "ID: 261"]
34509    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
34510    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
34511    #[doc = ""]
34512    #[doc = "ID: 401"]
34513    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
34514    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
34515    #[doc = ""]
34516    #[doc = "ID: 2"]
34517    SYSTEM_TIME(SYSTEM_TIME_DATA),
34518    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
34519    #[doc = ""]
34520    #[doc = "ID: 1"]
34521    SYS_STATUS(SYS_STATUS_DATA),
34522    #[doc = "Current motion information from sensors on a target."]
34523    #[doc = ""]
34524    #[doc = "ID: 510"]
34525    TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA),
34526    #[doc = "The location of a target measured by MAV's onboard sensors."]
34527    #[doc = ""]
34528    #[doc = "ID: 511"]
34529    TARGET_RELATIVE(TARGET_RELATIVE_DATA),
34530    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
34531    #[doc = ""]
34532    #[doc = "ID: 135"]
34533    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
34534    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34535    #[doc = ""]
34536    #[doc = "ID: 134"]
34537    TERRAIN_DATA(TERRAIN_DATA_DATA),
34538    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34539    #[doc = ""]
34540    #[doc = "ID: 136"]
34541    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
34542    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34543    #[doc = ""]
34544    #[doc = "ID: 133"]
34545    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
34546    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
34547    #[doc = ""]
34548    #[doc = "ID: 111"]
34549    TIMESYNC(TIMESYNC_DATA),
34550    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
34551    #[doc = ""]
34552    #[doc = "ID: 380"]
34553    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
34554    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
34555    #[doc = ""]
34556    #[doc = "ID: 333"]
34557    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
34558    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
34559    #[doc = ""]
34560    #[doc = "ID: 332"]
34561    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
34562    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
34563    #[doc = ""]
34564    #[doc = "ID: 385"]
34565    TUNNEL(TUNNEL_DATA),
34566    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
34567    #[doc = ""]
34568    #[doc = "ID: 311"]
34569    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
34570    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
34571    #[doc = ""]
34572    #[doc = "ID: 310"]
34573    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
34574    #[doc = "The global position resulting from GPS and sensor fusion."]
34575    #[doc = ""]
34576    #[doc = "ID: 340"]
34577    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
34578    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
34579    #[doc = ""]
34580    #[doc = "ID: 248"]
34581    V2_EXTENSION(V2_EXTENSION_DATA),
34582    #[doc = "Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS."]
34583    #[doc = ""]
34584    #[doc = "ID: 355"]
34585    VELOCITY_LIMITS(VELOCITY_LIMITS_DATA),
34586    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
34587    #[doc = ""]
34588    #[doc = "ID: 74"]
34589    VFR_HUD(VFR_HUD_DATA),
34590    #[doc = "Vibration levels and accelerometer clipping."]
34591    #[doc = ""]
34592    #[doc = "ID: 241"]
34593    VIBRATION(VIBRATION_DATA),
34594    #[doc = "Global position estimate from a Vicon motion system source."]
34595    #[doc = ""]
34596    #[doc = "ID: 104"]
34597    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
34598    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34599    #[doc = ""]
34600    #[doc = "ID: 269"]
34601    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
34602    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34603    #[doc = ""]
34604    #[doc = "ID: 270"]
34605    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
34606    #[doc = "Local position/attitude estimate from a vision source."]
34607    #[doc = ""]
34608    #[doc = "ID: 102"]
34609    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
34610    #[doc = "Speed estimate from a vision source."]
34611    #[doc = ""]
34612    #[doc = "ID: 103"]
34613    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
34614    #[doc = "Cumulative distance traveled for each reported wheel."]
34615    #[doc = ""]
34616    #[doc = "ID: 9000"]
34617    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
34618    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34619    #[doc = ""]
34620    #[doc = "ID: 299"]
34621    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
34622    #[doc = "Winch status."]
34623    #[doc = ""]
34624    #[doc = "ID: 9005"]
34625    WINCH_STATUS(WINCH_STATUS_DATA),
34626    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34627    #[doc = ""]
34628    #[doc = "ID: 231"]
34629    WIND_COV(WIND_COV_DATA),
34630}
34631impl MavMessage {
34632    pub const fn all_ids() -> &'static [u32] {
34633        &[
34634            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
34635            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
34636            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
34637            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
34638            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
34639            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
34640            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
34641            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
34642            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
34643            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
34644            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
34645            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
34646            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
34647            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
34648            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
34649            295u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32,
34650            330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 354u32,
34651            355u32, 360u32, 361u32, 369u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
34652            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
34653            412u32, 413u32, 414u32, 415u32, 420u32, 435u32, 436u32, 437u32, 440u32, 441u32, 510u32,
34654            511u32, 512u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32,
34655            12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
34656        ]
34657    }
34658}
34659impl Message for MavMessage {
34660    fn parse(
34661        version: MavlinkVersion,
34662        id: u32,
34663        payload: &[u8],
34664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34665        match id {
34666            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34667                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34668                    .map(Self::ACTUATOR_CONTROL_TARGET)
34669            }
34670            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34671                .map(Self::ACTUATOR_OUTPUT_STATUS),
34672            ADSB_VEHICLE_DATA::ID => {
34673                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34674            }
34675            AIRSPEED_DATA::ID => AIRSPEED_DATA::deser(version, payload).map(Self::AIRSPEED),
34676            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34677            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34678            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34679            ATTITUDE_QUATERNION_DATA::ID => {
34680                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34681            }
34682            ATTITUDE_QUATERNION_COV_DATA::ID => {
34683                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34684                    .map(Self::ATTITUDE_QUATERNION_COV)
34685            }
34686            ATTITUDE_TARGET_DATA::ID => {
34687                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34688            }
34689            ATT_POS_MOCAP_DATA::ID => {
34690                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34691            }
34692            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34693            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34694                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34695                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34696            }
34697            AUTOPILOT_VERSION_DATA::ID => {
34698                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34699            }
34700            AVAILABLE_MODES_DATA::ID => {
34701                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34702            }
34703            AVAILABLE_MODES_MONITOR_DATA::ID => {
34704                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34705                    .map(Self::AVAILABLE_MODES_MONITOR)
34706            }
34707            BATTERY_INFO_DATA::ID => {
34708                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34709            }
34710            BATTERY_STATUS_DATA::ID => {
34711                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34712            }
34713            BATTERY_STATUS_V2_DATA::ID => {
34714                BATTERY_STATUS_V2_DATA::deser(version, payload).map(Self::BATTERY_STATUS_V2)
34715            }
34716            BUTTON_CHANGE_DATA::ID => {
34717                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34718            }
34719            CAMERA_CAPTURE_STATUS_DATA::ID => {
34720                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34721            }
34722            CAMERA_FOV_STATUS_DATA::ID => {
34723                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34724            }
34725            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34726                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34727            }
34728            CAMERA_INFORMATION_DATA::ID => {
34729                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34730            }
34731            CAMERA_SETTINGS_DATA::ID => {
34732                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34733            }
34734            CAMERA_THERMAL_RANGE_DATA::ID => {
34735                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34736            }
34737            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34738                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34739                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34740            }
34741            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34742                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34743                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34744            }
34745            CAMERA_TRIGGER_DATA::ID => {
34746                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34747            }
34748            CANFD_FRAME_DATA::ID => {
34749                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34750            }
34751            CAN_FILTER_MODIFY_DATA::ID => {
34752                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34753            }
34754            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34755            CELLULAR_CONFIG_DATA::ID => {
34756                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34757            }
34758            CELLULAR_STATUS_DATA::ID => {
34759                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34760            }
34761            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34762                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34763                    .map(Self::CHANGE_OPERATOR_CONTROL)
34764            }
34765            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34766                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34767                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34768            }
34769            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34770            COMMAND_ACK_DATA::ID => {
34771                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34772            }
34773            COMMAND_CANCEL_DATA::ID => {
34774                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34775            }
34776            COMMAND_INT_DATA::ID => {
34777                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34778            }
34779            COMMAND_LONG_DATA::ID => {
34780                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34781            }
34782            COMPONENT_INFORMATION_DATA::ID => {
34783                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34784            }
34785            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34786                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34787                    .map(Self::COMPONENT_INFORMATION_BASIC)
34788            }
34789            COMPONENT_METADATA_DATA::ID => {
34790                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34791            }
34792            CONTROL_STATUS_DATA::ID => {
34793                CONTROL_STATUS_DATA::deser(version, payload).map(Self::CONTROL_STATUS)
34794            }
34795            CONTROL_SYSTEM_STATE_DATA::ID => {
34796                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34797            }
34798            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34799                .map(Self::CURRENT_EVENT_SEQUENCE),
34800            CURRENT_MODE_DATA::ID => {
34801                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34802            }
34803            DATA_STREAM_DATA::ID => {
34804                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34805            }
34806            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34807                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34808                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34809            }
34810            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34811            DEBUG_FLOAT_ARRAY_DATA::ID => {
34812                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34813            }
34814            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34815            DISTANCE_SENSOR_DATA::ID => {
34816                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34817            }
34818            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34819            ENCAPSULATED_DATA_DATA::ID => {
34820                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34821            }
34822            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34823            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34824            ESTIMATOR_STATUS_DATA::ID => {
34825                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34826            }
34827            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34828            EXTENDED_SYS_STATE_DATA::ID => {
34829                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34830            }
34831            FENCE_STATUS_DATA::ID => {
34832                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34833            }
34834            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => {
34835                FIGURE_EIGHT_EXECUTION_STATUS_DATA::deser(version, payload)
34836                    .map(Self::FIGURE_EIGHT_EXECUTION_STATUS)
34837            }
34838            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34839                .map(Self::FILE_TRANSFER_PROTOCOL),
34840            FLIGHT_INFORMATION_DATA::ID => {
34841                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34842            }
34843            FOLLOW_TARGET_DATA::ID => {
34844                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34845            }
34846            FUEL_STATUS_DATA::ID => {
34847                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34848            }
34849            GENERATOR_STATUS_DATA::ID => {
34850                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34851            }
34852            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34853                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34854                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34855            }
34856            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34857                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34858                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34859            }
34860            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34861                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34862                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34863            }
34864            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34865                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34866                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34867            }
34868            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34869                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34870                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34871            }
34872            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34873                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34874                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34875            }
34876            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34877                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34878                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34879            }
34880            GIMBAL_MANAGER_STATUS_DATA::ID => {
34881                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34882            }
34883            GLOBAL_POSITION_INT_DATA::ID => {
34884                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34885            }
34886            GLOBAL_POSITION_INT_COV_DATA::ID => {
34887                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34888                    .map(Self::GLOBAL_POSITION_INT_COV)
34889            }
34890            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34891                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34892                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34893            }
34894            GNSS_INTEGRITY_DATA::ID => {
34895                GNSS_INTEGRITY_DATA::deser(version, payload).map(Self::GNSS_INTEGRITY)
34896            }
34897            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34898            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34899            GPS_GLOBAL_ORIGIN_DATA::ID => {
34900                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34901            }
34902            GPS_INJECT_DATA_DATA::ID => {
34903                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34904            }
34905            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34906            GPS_RAW_INT_DATA::ID => {
34907                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34908            }
34909            GPS_RTCM_DATA_DATA::ID => {
34910                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34911            }
34912            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34913            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34914            GROUP_END_DATA::ID => GROUP_END_DATA::deser(version, payload).map(Self::GROUP_END),
34915            GROUP_START_DATA::ID => {
34916                GROUP_START_DATA::deser(version, payload).map(Self::GROUP_START)
34917            }
34918            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34919            HIGHRES_IMU_DATA::ID => {
34920                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34921            }
34922            HIGH_LATENCY_DATA::ID => {
34923                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34924            }
34925            HIGH_LATENCY2_DATA::ID => {
34926                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34927            }
34928            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34929                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34930            }
34931            HIL_CONTROLS_DATA::ID => {
34932                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34933            }
34934            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34935            HIL_OPTICAL_FLOW_DATA::ID => {
34936                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34937            }
34938            HIL_RC_INPUTS_RAW_DATA::ID => {
34939                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34940            }
34941            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34942            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34943            HIL_STATE_QUATERNION_DATA::ID => {
34944                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34945            }
34946            HOME_POSITION_DATA::ID => {
34947                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34948            }
34949            HYGROMETER_SENSOR_DATA::ID => {
34950                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34951            }
34952            ILLUMINATOR_STATUS_DATA::ID => {
34953                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34954            }
34955            ISBD_LINK_STATUS_DATA::ID => {
34956                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34957            }
34958            LANDING_TARGET_DATA::ID => {
34959                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34960            }
34961            LINK_NODE_STATUS_DATA::ID => {
34962                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34963            }
34964            LOCAL_POSITION_NED_DATA::ID => {
34965                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34966            }
34967            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34968                .map(Self::LOCAL_POSITION_NED_COV),
34969            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34970                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34971                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34972            }
34973            LOGGING_ACK_DATA::ID => {
34974                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34975            }
34976            LOGGING_DATA_DATA::ID => {
34977                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34978            }
34979            LOGGING_DATA_ACKED_DATA::ID => {
34980                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34981            }
34982            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34983            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34984            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34985            LOG_REQUEST_DATA_DATA::ID => {
34986                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34987            }
34988            LOG_REQUEST_END_DATA::ID => {
34989                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34990            }
34991            LOG_REQUEST_LIST_DATA::ID => {
34992                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34993            }
34994            MAG_CAL_REPORT_DATA::ID => {
34995                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34996            }
34997            MANUAL_CONTROL_DATA::ID => {
34998                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34999            }
35000            MANUAL_SETPOINT_DATA::ID => {
35001                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
35002            }
35003            MEMORY_VECT_DATA::ID => {
35004                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
35005            }
35006            MESSAGE_INTERVAL_DATA::ID => {
35007                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
35008            }
35009            MISSION_ACK_DATA::ID => {
35010                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
35011            }
35012            MISSION_CLEAR_ALL_DATA::ID => {
35013                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
35014            }
35015            MISSION_COUNT_DATA::ID => {
35016                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
35017            }
35018            MISSION_CURRENT_DATA::ID => {
35019                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
35020            }
35021            MISSION_ITEM_DATA::ID => {
35022                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
35023            }
35024            MISSION_ITEM_INT_DATA::ID => {
35025                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
35026            }
35027            MISSION_ITEM_REACHED_DATA::ID => {
35028                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
35029            }
35030            MISSION_REQUEST_DATA::ID => {
35031                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
35032            }
35033            MISSION_REQUEST_INT_DATA::ID => {
35034                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
35035            }
35036            MISSION_REQUEST_LIST_DATA::ID => {
35037                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
35038            }
35039            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
35040                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
35041                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
35042            }
35043            MISSION_SET_CURRENT_DATA::ID => {
35044                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
35045            }
35046            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
35047                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
35048                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
35049            }
35050            MOUNT_ORIENTATION_DATA::ID => {
35051                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
35052            }
35053            NAMED_VALUE_FLOAT_DATA::ID => {
35054                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
35055            }
35056            NAMED_VALUE_INT_DATA::ID => {
35057                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
35058            }
35059            NAV_CONTROLLER_OUTPUT_DATA::ID => {
35060                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
35061            }
35062            OBSTACLE_DISTANCE_DATA::ID => {
35063                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
35064            }
35065            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
35066            ONBOARD_COMPUTER_STATUS_DATA::ID => {
35067                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
35068                    .map(Self::ONBOARD_COMPUTER_STATUS)
35069            }
35070            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
35071                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
35072                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
35073            }
35074            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
35075                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
35076                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
35077            }
35078            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
35079                .map(Self::OPEN_DRONE_ID_BASIC_ID),
35080            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
35081                .map(Self::OPEN_DRONE_ID_LOCATION),
35082            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
35083                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
35084                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
35085            }
35086            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
35087                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
35088                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
35089            }
35090            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
35091                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
35092            }
35093            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
35094                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
35095            }
35096            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
35097                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
35098                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
35099            }
35100            OPTICAL_FLOW_DATA::ID => {
35101                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
35102            }
35103            OPTICAL_FLOW_RAD_DATA::ID => {
35104                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
35105            }
35106            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
35107                .map(Self::ORBIT_EXECUTION_STATUS),
35108            PARAM_EXT_ACK_DATA::ID => {
35109                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
35110            }
35111            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
35112                .map(Self::PARAM_EXT_REQUEST_LIST),
35113            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
35114                .map(Self::PARAM_EXT_REQUEST_READ),
35115            PARAM_EXT_SET_DATA::ID => {
35116                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
35117            }
35118            PARAM_EXT_VALUE_DATA::ID => {
35119                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
35120            }
35121            PARAM_MAP_RC_DATA::ID => {
35122                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
35123            }
35124            PARAM_REQUEST_LIST_DATA::ID => {
35125                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
35126            }
35127            PARAM_REQUEST_READ_DATA::ID => {
35128                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
35129            }
35130            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
35131            PARAM_VALUE_DATA::ID => {
35132                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
35133            }
35134            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
35135            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
35136            PLAY_TUNE_V2_DATA::ID => {
35137                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
35138            }
35139            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35140                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35141                    .map(Self::POSITION_TARGET_GLOBAL_INT)
35142            }
35143            POSITION_TARGET_LOCAL_NED_DATA::ID => {
35144                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35145                    .map(Self::POSITION_TARGET_LOCAL_NED)
35146            }
35147            POWER_STATUS_DATA::ID => {
35148                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
35149            }
35150            PROTOCOL_VERSION_DATA::ID => {
35151                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
35152            }
35153            RADIO_RC_CHANNELS_DATA::ID => {
35154                RADIO_RC_CHANNELS_DATA::deser(version, payload).map(Self::RADIO_RC_CHANNELS)
35155            }
35156            RADIO_STATUS_DATA::ID => {
35157                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
35158            }
35159            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
35160            RAW_PRESSURE_DATA::ID => {
35161                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
35162            }
35163            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
35164            RC_CHANNELS_DATA::ID => {
35165                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
35166            }
35167            RC_CHANNELS_OVERRIDE_DATA::ID => {
35168                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
35169            }
35170            RC_CHANNELS_RAW_DATA::ID => {
35171                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
35172            }
35173            RC_CHANNELS_SCALED_DATA::ID => {
35174                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
35175            }
35176            REQUEST_DATA_STREAM_DATA::ID => {
35177                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
35178            }
35179            REQUEST_EVENT_DATA::ID => {
35180                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
35181            }
35182            RESOURCE_REQUEST_DATA::ID => {
35183                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
35184            }
35185            RESPONSE_EVENT_ERROR_DATA::ID => {
35186                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
35187            }
35188            SAFETY_ALLOWED_AREA_DATA::ID => {
35189                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
35190            }
35191            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
35192                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
35193                    .map(Self::SAFETY_SET_ALLOWED_AREA)
35194            }
35195            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
35196            SCALED_IMU2_DATA::ID => {
35197                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
35198            }
35199            SCALED_IMU3_DATA::ID => {
35200                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
35201            }
35202            SCALED_PRESSURE_DATA::ID => {
35203                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
35204            }
35205            SCALED_PRESSURE2_DATA::ID => {
35206                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
35207            }
35208            SCALED_PRESSURE3_DATA::ID => {
35209                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
35210            }
35211            SERIAL_CONTROL_DATA::ID => {
35212                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
35213            }
35214            SERVO_OUTPUT_RAW_DATA::ID => {
35215                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
35216            }
35217            SETUP_SIGNING_DATA::ID => {
35218                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
35219            }
35220            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
35221                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35222                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
35223            }
35224            SET_ATTITUDE_TARGET_DATA::ID => {
35225                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
35226            }
35227            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
35228                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
35229            }
35230            SET_HOME_POSITION_DATA::ID => {
35231                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
35232            }
35233            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
35234            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35235                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35236                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
35237            }
35238            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
35239                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35240                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
35241            }
35242            SET_VELOCITY_LIMITS_DATA::ID => {
35243                SET_VELOCITY_LIMITS_DATA::deser(version, payload).map(Self::SET_VELOCITY_LIMITS)
35244            }
35245            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
35246            SMART_BATTERY_INFO_DATA::ID => {
35247                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
35248            }
35249            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
35250            STORAGE_INFORMATION_DATA::ID => {
35251                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
35252            }
35253            SUPPORTED_TUNES_DATA::ID => {
35254                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
35255            }
35256            SYSTEM_TIME_DATA::ID => {
35257                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
35258            }
35259            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
35260            TARGET_ABSOLUTE_DATA::ID => {
35261                TARGET_ABSOLUTE_DATA::deser(version, payload).map(Self::TARGET_ABSOLUTE)
35262            }
35263            TARGET_RELATIVE_DATA::ID => {
35264                TARGET_RELATIVE_DATA::deser(version, payload).map(Self::TARGET_RELATIVE)
35265            }
35266            TERRAIN_CHECK_DATA::ID => {
35267                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
35268            }
35269            TERRAIN_DATA_DATA::ID => {
35270                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
35271            }
35272            TERRAIN_REPORT_DATA::ID => {
35273                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
35274            }
35275            TERRAIN_REQUEST_DATA::ID => {
35276                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
35277            }
35278            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
35279            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
35280                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
35281                    .map(Self::TIME_ESTIMATE_TO_TARGET)
35282            }
35283            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35284                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
35285                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
35286            }
35287            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35288                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
35289                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
35290            }
35291            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
35292            UAVCAN_NODE_INFO_DATA::ID => {
35293                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
35294            }
35295            UAVCAN_NODE_STATUS_DATA::ID => {
35296                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
35297            }
35298            UTM_GLOBAL_POSITION_DATA::ID => {
35299                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
35300            }
35301            V2_EXTENSION_DATA::ID => {
35302                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
35303            }
35304            VELOCITY_LIMITS_DATA::ID => {
35305                VELOCITY_LIMITS_DATA::deser(version, payload).map(Self::VELOCITY_LIMITS)
35306            }
35307            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
35308            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
35309            VICON_POSITION_ESTIMATE_DATA::ID => {
35310                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35311                    .map(Self::VICON_POSITION_ESTIMATE)
35312            }
35313            VIDEO_STREAM_INFORMATION_DATA::ID => {
35314                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35315                    .map(Self::VIDEO_STREAM_INFORMATION)
35316            }
35317            VIDEO_STREAM_STATUS_DATA::ID => {
35318                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35319            }
35320            VISION_POSITION_ESTIMATE_DATA::ID => {
35321                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35322                    .map(Self::VISION_POSITION_ESTIMATE)
35323            }
35324            VISION_SPEED_ESTIMATE_DATA::ID => {
35325                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35326            }
35327            WHEEL_DISTANCE_DATA::ID => {
35328                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35329            }
35330            WIFI_CONFIG_AP_DATA::ID => {
35331                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35332            }
35333            WINCH_STATUS_DATA::ID => {
35334                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35335            }
35336            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35337            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35338        }
35339    }
35340    fn message_name(&self) -> &'static str {
35341        match self {
35342            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35343            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35344            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35345            Self::AIRSPEED(..) => AIRSPEED_DATA::NAME,
35346            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35347            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35348            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35349            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35350            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35351            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35352            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35353            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35354            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35355                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35356            }
35357            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35358            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35359            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35360            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35361            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35362            Self::BATTERY_STATUS_V2(..) => BATTERY_STATUS_V2_DATA::NAME,
35363            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35364            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35365            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35366            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35367            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35368            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35369            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35370            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35371            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35372            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35373            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35374            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35375            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35376            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35377            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35378            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35379            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35380            Self::COLLISION(..) => COLLISION_DATA::NAME,
35381            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35382            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35383            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35384            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35385            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35386            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35387            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35388            Self::CONTROL_STATUS(..) => CONTROL_STATUS_DATA::NAME,
35389            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35390            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
35391            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
35392            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
35393            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35394            Self::DEBUG(..) => DEBUG_DATA::NAME,
35395            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
35396            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
35397            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
35398            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
35399            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
35400            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
35401            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
35402            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
35403            Self::EVENT(..) => EVENT_DATA::NAME,
35404            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
35405            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
35406            Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME,
35407            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
35408            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
35409            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
35410            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
35411            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
35412            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
35413            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
35414            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
35415            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
35416            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
35417            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35418                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
35419            }
35420            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
35421            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
35422            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
35423            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
35424            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35425            Self::GNSS_INTEGRITY(..) => GNSS_INTEGRITY_DATA::NAME,
35426            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
35427            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
35428            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
35429            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
35430            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
35431            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
35432            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
35433            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
35434            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
35435            Self::GROUP_END(..) => GROUP_END_DATA::NAME,
35436            Self::GROUP_START(..) => GROUP_START_DATA::NAME,
35437            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
35438            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
35439            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
35440            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
35441            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
35442            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
35443            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
35444            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
35445            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
35446            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
35447            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
35448            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
35449            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
35450            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
35451            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
35452            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
35453            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
35454            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
35455            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
35456            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
35457            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35458                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
35459            }
35460            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
35461            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
35462            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
35463            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
35464            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
35465            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
35466            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
35467            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
35468            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
35469            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
35470            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
35471            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
35472            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
35473            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
35474            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
35475            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
35476            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
35477            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
35478            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
35479            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
35480            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
35481            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
35482            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
35483            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
35484            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35485            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
35486            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35487            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
35488            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
35489            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
35490            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
35491            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
35492            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
35493            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
35494            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35495            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35496            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35497            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
35498            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35499            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35500            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35501            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35502            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35503            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
35504            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
35505            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
35506            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
35507            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
35508            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
35509            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
35510            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
35511            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
35512            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
35513            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
35514            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
35515            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
35516            Self::PING(..) => PING_DATA::NAME,
35517            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
35518            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
35519            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35520            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
35521            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
35522            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
35523            Self::RADIO_RC_CHANNELS(..) => RADIO_RC_CHANNELS_DATA::NAME,
35524            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
35525            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
35526            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
35527            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
35528            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
35529            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
35530            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
35531            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
35532            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
35533            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
35534            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
35535            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
35536            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
35537            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35538            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
35539            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
35540            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
35541            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
35542            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
35543            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
35544            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
35545            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
35546            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
35547            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35548            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
35549            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35550            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
35551            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
35552            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35553            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35554            Self::SET_VELOCITY_LIMITS(..) => SET_VELOCITY_LIMITS_DATA::NAME,
35555            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
35556            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
35557            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
35558            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
35559            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
35560            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
35561            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
35562            Self::TARGET_ABSOLUTE(..) => TARGET_ABSOLUTE_DATA::NAME,
35563            Self::TARGET_RELATIVE(..) => TARGET_RELATIVE_DATA::NAME,
35564            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
35565            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
35566            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
35567            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
35568            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
35569            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35570            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
35571                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
35572            }
35573            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35574                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
35575            }
35576            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
35577            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
35578            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
35579            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
35580            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
35581            Self::VELOCITY_LIMITS(..) => VELOCITY_LIMITS_DATA::NAME,
35582            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
35583            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
35584            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
35585            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
35586            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
35587            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
35588            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
35589            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
35590            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
35591            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
35592            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
35593        }
35594    }
35595    fn message_id(&self) -> u32 {
35596        match self {
35597            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
35598            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
35599            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
35600            Self::AIRSPEED(..) => AIRSPEED_DATA::ID,
35601            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
35602            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
35603            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
35604            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
35605            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
35606            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
35607            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
35608            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
35609            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35610                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
35611            }
35612            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
35613            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
35614            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
35615            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
35616            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
35617            Self::BATTERY_STATUS_V2(..) => BATTERY_STATUS_V2_DATA::ID,
35618            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
35619            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
35620            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
35621            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
35622            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
35623            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
35624            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
35625            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35626            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35627            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
35628            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
35629            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
35630            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
35631            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
35632            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
35633            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
35634            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35635            Self::COLLISION(..) => COLLISION_DATA::ID,
35636            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
35637            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
35638            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
35639            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
35640            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
35641            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
35642            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
35643            Self::CONTROL_STATUS(..) => CONTROL_STATUS_DATA::ID,
35644            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
35645            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
35646            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
35647            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
35648            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35649            Self::DEBUG(..) => DEBUG_DATA::ID,
35650            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
35651            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
35652            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
35653            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
35654            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
35655            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
35656            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
35657            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
35658            Self::EVENT(..) => EVENT_DATA::ID,
35659            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
35660            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
35661            Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID,
35662            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
35663            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
35664            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
35665            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
35666            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
35667            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35668            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
35669            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35670            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
35671            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35672            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35673                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
35674            }
35675            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35676            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
35677            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
35678            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
35679            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35680            Self::GNSS_INTEGRITY(..) => GNSS_INTEGRITY_DATA::ID,
35681            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
35682            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
35683            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35684            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35685            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35686            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35687            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35688            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35689            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35690            Self::GROUP_END(..) => GROUP_END_DATA::ID,
35691            Self::GROUP_START(..) => GROUP_START_DATA::ID,
35692            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35693            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35694            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35695            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35696            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35697            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35698            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35699            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35700            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35701            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35702            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35703            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35704            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35705            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35706            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35707            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35708            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35709            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35710            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35711            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35712            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35713                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35714            }
35715            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35716            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35717            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35718            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35719            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35720            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35721            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35722            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35723            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35724            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35725            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35726            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35727            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35728            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35729            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35730            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35731            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35732            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35733            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35734            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35735            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35736            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35737            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35738            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35739            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35740            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35741            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35742            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35743            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35744            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35745            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35746            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35747            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35748            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35749            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35750            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35751            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35752            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35753            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35754            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35755            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35756            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35757            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35758            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35759            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35760            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35761            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35762            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35763            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35764            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35765            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35766            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35767            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35768            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35769            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35770            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35771            Self::PING(..) => PING_DATA::ID,
35772            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35773            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35774            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35775            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35776            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35777            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35778            Self::RADIO_RC_CHANNELS(..) => RADIO_RC_CHANNELS_DATA::ID,
35779            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35780            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35781            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35782            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35783            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35784            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35785            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35786            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35787            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35788            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35789            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35790            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35791            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35792            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35793            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35794            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35795            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35796            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35797            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35798            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35799            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35800            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35801            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35802            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35803            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35804            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35805            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35806            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35807            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35808            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35809            Self::SET_VELOCITY_LIMITS(..) => SET_VELOCITY_LIMITS_DATA::ID,
35810            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35811            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35812            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35813            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35814            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35815            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35816            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35817            Self::TARGET_ABSOLUTE(..) => TARGET_ABSOLUTE_DATA::ID,
35818            Self::TARGET_RELATIVE(..) => TARGET_RELATIVE_DATA::ID,
35819            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35820            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35821            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35822            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35823            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35824            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35825            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35826            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35827                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35828            }
35829            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35830            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35831            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35832            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35833            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35834            Self::VELOCITY_LIMITS(..) => VELOCITY_LIMITS_DATA::ID,
35835            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35836            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35837            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35838            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35839            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35840            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35841            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35842            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35843            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35844            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35845            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35846        }
35847    }
35848    fn message_id_from_name(name: &str) -> Option<u32> {
35849        match name {
35850            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35851            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35852            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35853            AIRSPEED_DATA::NAME => Some(AIRSPEED_DATA::ID),
35854            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35855            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35856            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35857            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35858            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35859            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35860            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35861            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35862            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35863                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35864            }
35865            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35866            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35867            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35868            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35869            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35870            BATTERY_STATUS_V2_DATA::NAME => Some(BATTERY_STATUS_V2_DATA::ID),
35871            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35872            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35873            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35874            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35875            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35876            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35877            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35878            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35879            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35880            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35881            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35882            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35883            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35884            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35885            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35886            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35887            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35888            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35889            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35890            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35891            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35892            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35893            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35894            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35895            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35896            CONTROL_STATUS_DATA::NAME => Some(CONTROL_STATUS_DATA::ID),
35897            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35898            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35899            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35900            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35901            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35902            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35903            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35904            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35905            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35906            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35907            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35908            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35909            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35910            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35911            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35912            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35913            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35914            FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME => {
35915                Some(FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID)
35916            }
35917            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35918            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35919            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35920            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35921            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35922            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35923                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35924            }
35925            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35926            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35927            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35928            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35929            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35930                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35931            }
35932            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35933            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35934            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35935            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35936            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35937                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35938            }
35939            GNSS_INTEGRITY_DATA::NAME => Some(GNSS_INTEGRITY_DATA::ID),
35940            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35941            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35942            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35943            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35944            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35945            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35946            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35947            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35948            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35949            GROUP_END_DATA::NAME => Some(GROUP_END_DATA::ID),
35950            GROUP_START_DATA::NAME => Some(GROUP_START_DATA::ID),
35951            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35952            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35953            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35954            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35955            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35956            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35957            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35958            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35959            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35960            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35961            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35962            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35963            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35964            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35965            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35966            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35967            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35968            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35969            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35970            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35971            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35972                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35973            }
35974            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35975            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35976            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35977            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35978            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35979            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35980            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35981            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35982            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35983            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35984            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35985            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35986            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35987            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35988            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35989            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35990            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35991            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35992            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35993            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35994            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35995            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35996            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35997            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35998            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35999            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
36000            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
36001            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
36002            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
36003            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
36004            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
36005            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
36006            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
36007            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
36008            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
36009            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
36010            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
36011            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
36012            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
36013            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
36014            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
36015            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
36016            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
36017            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
36018            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
36019            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
36020            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
36021            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
36022            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
36023            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
36024            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
36025            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
36026            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
36027            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
36028            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
36029            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
36030            PING_DATA::NAME => Some(PING_DATA::ID),
36031            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
36032            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
36033            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
36034            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
36035            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
36036            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
36037            RADIO_RC_CHANNELS_DATA::NAME => Some(RADIO_RC_CHANNELS_DATA::ID),
36038            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
36039            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
36040            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
36041            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
36042            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
36043            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
36044            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
36045            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
36046            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
36047            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
36048            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
36049            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
36050            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
36051            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
36052            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
36053            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
36054            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
36055            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
36056            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
36057            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
36058            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
36059            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
36060            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
36061            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
36062            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
36063            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
36064            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
36065            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
36066            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
36067                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
36068            }
36069            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
36070                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
36071            }
36072            SET_VELOCITY_LIMITS_DATA::NAME => Some(SET_VELOCITY_LIMITS_DATA::ID),
36073            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
36074            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
36075            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
36076            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
36077            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
36078            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
36079            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
36080            TARGET_ABSOLUTE_DATA::NAME => Some(TARGET_ABSOLUTE_DATA::ID),
36081            TARGET_RELATIVE_DATA::NAME => Some(TARGET_RELATIVE_DATA::ID),
36082            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
36083            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
36084            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
36085            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
36086            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
36087            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
36088            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
36089                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
36090            }
36091            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
36092                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
36093            }
36094            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
36095            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
36096            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
36097            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
36098            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
36099            VELOCITY_LIMITS_DATA::NAME => Some(VELOCITY_LIMITS_DATA::ID),
36100            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
36101            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
36102            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
36103            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
36104            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
36105            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
36106            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
36107            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
36108            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
36109            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
36110            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
36111            _ => None,
36112        }
36113    }
36114    fn default_message_from_id(id: u32) -> Option<Self> {
36115        match id {
36116            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36117                ACTUATOR_CONTROL_TARGET_DATA::default(),
36118            )),
36119            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36120                ACTUATOR_OUTPUT_STATUS_DATA::default(),
36121            )),
36122            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
36123            AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::default())),
36124            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
36125            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
36126            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
36127            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36128                ATTITUDE_QUATERNION_DATA::default(),
36129            )),
36130            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36131                ATTITUDE_QUATERNION_COV_DATA::default(),
36132            )),
36133            ATTITUDE_TARGET_DATA::ID => {
36134                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
36135            }
36136            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
36137            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
36138            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36139                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36140                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
36141                ))
36142            }
36143            AUTOPILOT_VERSION_DATA::ID => {
36144                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
36145            }
36146            AVAILABLE_MODES_DATA::ID => {
36147                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
36148            }
36149            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36150                AVAILABLE_MODES_MONITOR_DATA::default(),
36151            )),
36152            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
36153            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
36154            BATTERY_STATUS_V2_DATA::ID => {
36155                Some(Self::BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA::default()))
36156            }
36157            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
36158            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36159                CAMERA_CAPTURE_STATUS_DATA::default(),
36160            )),
36161            CAMERA_FOV_STATUS_DATA::ID => {
36162                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
36163            }
36164            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36165                CAMERA_IMAGE_CAPTURED_DATA::default(),
36166            )),
36167            CAMERA_INFORMATION_DATA::ID => {
36168                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
36169            }
36170            CAMERA_SETTINGS_DATA::ID => {
36171                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
36172            }
36173            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36174                CAMERA_THERMAL_RANGE_DATA::default(),
36175            )),
36176            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36177                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
36178            )),
36179            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36180                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
36181            )),
36182            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
36183            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
36184            CAN_FILTER_MODIFY_DATA::ID => {
36185                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
36186            }
36187            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
36188            CELLULAR_CONFIG_DATA::ID => {
36189                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
36190            }
36191            CELLULAR_STATUS_DATA::ID => {
36192                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
36193            }
36194            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36195                CHANGE_OPERATOR_CONTROL_DATA::default(),
36196            )),
36197            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36198                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
36199            )),
36200            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
36201            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
36202            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
36203            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
36204            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
36205            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36206                COMPONENT_INFORMATION_DATA::default(),
36207            )),
36208            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36209                COMPONENT_INFORMATION_BASIC_DATA::default(),
36210            )),
36211            COMPONENT_METADATA_DATA::ID => {
36212                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
36213            }
36214            CONTROL_STATUS_DATA::ID => Some(Self::CONTROL_STATUS(CONTROL_STATUS_DATA::default())),
36215            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36216                CONTROL_SYSTEM_STATE_DATA::default(),
36217            )),
36218            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36219                CURRENT_EVENT_SEQUENCE_DATA::default(),
36220            )),
36221            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
36222            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
36223            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36224                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
36225            )),
36226            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
36227            DEBUG_FLOAT_ARRAY_DATA::ID => {
36228                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
36229            }
36230            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
36231            DISTANCE_SENSOR_DATA::ID => {
36232                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
36233            }
36234            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
36235            ENCAPSULATED_DATA_DATA::ID => {
36236                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
36237            }
36238            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
36239            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
36240            ESTIMATOR_STATUS_DATA::ID => {
36241                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
36242            }
36243            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
36244            EXTENDED_SYS_STATE_DATA::ID => {
36245                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
36246            }
36247            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
36248            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
36249                FIGURE_EIGHT_EXECUTION_STATUS_DATA::default(),
36250            )),
36251            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36252                FILE_TRANSFER_PROTOCOL_DATA::default(),
36253            )),
36254            FLIGHT_INFORMATION_DATA::ID => {
36255                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
36256            }
36257            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
36258            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
36259            GENERATOR_STATUS_DATA::ID => {
36260                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
36261            }
36262            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36263                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
36264            )),
36265            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36266                GIMBAL_DEVICE_INFORMATION_DATA::default(),
36267            )),
36268            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36269                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
36270            )),
36271            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36272                GIMBAL_MANAGER_INFORMATION_DATA::default(),
36273            )),
36274            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36275                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
36276            )),
36277            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36278                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36279                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
36280                ))
36281            }
36282            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36283                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
36284            )),
36285            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36286                GIMBAL_MANAGER_STATUS_DATA::default(),
36287            )),
36288            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36289                GLOBAL_POSITION_INT_DATA::default(),
36290            )),
36291            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36292                GLOBAL_POSITION_INT_COV_DATA::default(),
36293            )),
36294            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36295                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36296                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36297                ))
36298            }
36299            GNSS_INTEGRITY_DATA::ID => Some(Self::GNSS_INTEGRITY(GNSS_INTEGRITY_DATA::default())),
36300            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36301            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36302            GPS_GLOBAL_ORIGIN_DATA::ID => {
36303                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36304            }
36305            GPS_INJECT_DATA_DATA::ID => {
36306                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36307            }
36308            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36309            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36310            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36311            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36312            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36313            GROUP_END_DATA::ID => Some(Self::GROUP_END(GROUP_END_DATA::default())),
36314            GROUP_START_DATA::ID => Some(Self::GROUP_START(GROUP_START_DATA::default())),
36315            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36316            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36317            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36318            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36319            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36320                HIL_ACTUATOR_CONTROLS_DATA::default(),
36321            )),
36322            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36323            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36324            HIL_OPTICAL_FLOW_DATA::ID => {
36325                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36326            }
36327            HIL_RC_INPUTS_RAW_DATA::ID => {
36328                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36329            }
36330            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
36331            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
36332            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36333                HIL_STATE_QUATERNION_DATA::default(),
36334            )),
36335            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
36336            HYGROMETER_SENSOR_DATA::ID => {
36337                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
36338            }
36339            ILLUMINATOR_STATUS_DATA::ID => {
36340                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
36341            }
36342            ISBD_LINK_STATUS_DATA::ID => {
36343                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
36344            }
36345            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
36346            LINK_NODE_STATUS_DATA::ID => {
36347                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
36348            }
36349            LOCAL_POSITION_NED_DATA::ID => {
36350                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
36351            }
36352            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36353                LOCAL_POSITION_NED_COV_DATA::default(),
36354            )),
36355            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36356                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36357                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36358                ))
36359            }
36360            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36361            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36362            LOGGING_DATA_ACKED_DATA::ID => {
36363                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36364            }
36365            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36366            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36367            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36368            LOG_REQUEST_DATA_DATA::ID => {
36369                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36370            }
36371            LOG_REQUEST_END_DATA::ID => {
36372                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36373            }
36374            LOG_REQUEST_LIST_DATA::ID => {
36375                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
36376            }
36377            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
36378            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
36379            MANUAL_SETPOINT_DATA::ID => {
36380                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
36381            }
36382            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
36383            MESSAGE_INTERVAL_DATA::ID => {
36384                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
36385            }
36386            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
36387            MISSION_CLEAR_ALL_DATA::ID => {
36388                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
36389            }
36390            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
36391            MISSION_CURRENT_DATA::ID => {
36392                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
36393            }
36394            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
36395            MISSION_ITEM_INT_DATA::ID => {
36396                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
36397            }
36398            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36399                MISSION_ITEM_REACHED_DATA::default(),
36400            )),
36401            MISSION_REQUEST_DATA::ID => {
36402                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
36403            }
36404            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36405                MISSION_REQUEST_INT_DATA::default(),
36406            )),
36407            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36408                MISSION_REQUEST_LIST_DATA::default(),
36409            )),
36410            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36411                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
36412            )),
36413            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36414                MISSION_SET_CURRENT_DATA::default(),
36415            )),
36416            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36417                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
36418            )),
36419            MOUNT_ORIENTATION_DATA::ID => {
36420                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
36421            }
36422            NAMED_VALUE_FLOAT_DATA::ID => {
36423                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
36424            }
36425            NAMED_VALUE_INT_DATA::ID => {
36426                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
36427            }
36428            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36429                NAV_CONTROLLER_OUTPUT_DATA::default(),
36430            )),
36431            OBSTACLE_DISTANCE_DATA::ID => {
36432                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
36433            }
36434            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
36435            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36436                ONBOARD_COMPUTER_STATUS_DATA::default(),
36437            )),
36438            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36439                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
36440            )),
36441            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36442                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
36443            )),
36444            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36445                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
36446            )),
36447            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36448                OPEN_DRONE_ID_LOCATION_DATA::default(),
36449            )),
36450            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36451                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
36452            )),
36453            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36454                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
36455            )),
36456            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36457                OPEN_DRONE_ID_SELF_ID_DATA::default(),
36458            )),
36459            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36460                OPEN_DRONE_ID_SYSTEM_DATA::default(),
36461            )),
36462            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36463                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
36464            )),
36465            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
36466            OPTICAL_FLOW_RAD_DATA::ID => {
36467                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
36468            }
36469            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36470                ORBIT_EXECUTION_STATUS_DATA::default(),
36471            )),
36472            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
36473            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36474                PARAM_EXT_REQUEST_LIST_DATA::default(),
36475            )),
36476            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36477                PARAM_EXT_REQUEST_READ_DATA::default(),
36478            )),
36479            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
36480            PARAM_EXT_VALUE_DATA::ID => {
36481                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
36482            }
36483            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
36484            PARAM_REQUEST_LIST_DATA::ID => {
36485                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
36486            }
36487            PARAM_REQUEST_READ_DATA::ID => {
36488                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
36489            }
36490            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
36491            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
36492            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
36493            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
36494            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
36495            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36496                POSITION_TARGET_GLOBAL_INT_DATA::default(),
36497            )),
36498            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36499                POSITION_TARGET_LOCAL_NED_DATA::default(),
36500            )),
36501            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
36502            PROTOCOL_VERSION_DATA::ID => {
36503                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
36504            }
36505            RADIO_RC_CHANNELS_DATA::ID => {
36506                Some(Self::RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA::default()))
36507            }
36508            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
36509            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
36510            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
36511            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
36512            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
36513            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36514                RC_CHANNELS_OVERRIDE_DATA::default(),
36515            )),
36516            RC_CHANNELS_RAW_DATA::ID => {
36517                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
36518            }
36519            RC_CHANNELS_SCALED_DATA::ID => {
36520                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
36521            }
36522            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36523                REQUEST_DATA_STREAM_DATA::default(),
36524            )),
36525            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
36526            RESOURCE_REQUEST_DATA::ID => {
36527                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
36528            }
36529            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36530                RESPONSE_EVENT_ERROR_DATA::default(),
36531            )),
36532            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36533                SAFETY_ALLOWED_AREA_DATA::default(),
36534            )),
36535            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36536                SAFETY_SET_ALLOWED_AREA_DATA::default(),
36537            )),
36538            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
36539            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
36540            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
36541            SCALED_PRESSURE_DATA::ID => {
36542                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
36543            }
36544            SCALED_PRESSURE2_DATA::ID => {
36545                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
36546            }
36547            SCALED_PRESSURE3_DATA::ID => {
36548                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
36549            }
36550            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
36551            SERVO_OUTPUT_RAW_DATA::ID => {
36552                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
36553            }
36554            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
36555            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36556                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
36557            )),
36558            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36559                SET_ATTITUDE_TARGET_DATA::default(),
36560            )),
36561            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36562                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
36563            )),
36564            SET_HOME_POSITION_DATA::ID => {
36565                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
36566            }
36567            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
36568            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36569                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
36570            )),
36571            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36572                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
36573            )),
36574            SET_VELOCITY_LIMITS_DATA::ID => Some(Self::SET_VELOCITY_LIMITS(
36575                SET_VELOCITY_LIMITS_DATA::default(),
36576            )),
36577            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
36578            SMART_BATTERY_INFO_DATA::ID => {
36579                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
36580            }
36581            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
36582            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36583                STORAGE_INFORMATION_DATA::default(),
36584            )),
36585            SUPPORTED_TUNES_DATA::ID => {
36586                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
36587            }
36588            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
36589            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
36590            TARGET_ABSOLUTE_DATA::ID => {
36591                Some(Self::TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA::default()))
36592            }
36593            TARGET_RELATIVE_DATA::ID => {
36594                Some(Self::TARGET_RELATIVE(TARGET_RELATIVE_DATA::default()))
36595            }
36596            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
36597            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
36598            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
36599            TERRAIN_REQUEST_DATA::ID => {
36600                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
36601            }
36602            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
36603            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36604                TIME_ESTIMATE_TO_TARGET_DATA::default(),
36605            )),
36606            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36607                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36608                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
36609                ))
36610            }
36611            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36612                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36613                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
36614                ))
36615            }
36616            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
36617            UAVCAN_NODE_INFO_DATA::ID => {
36618                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
36619            }
36620            UAVCAN_NODE_STATUS_DATA::ID => {
36621                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
36622            }
36623            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36624                UTM_GLOBAL_POSITION_DATA::default(),
36625            )),
36626            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
36627            VELOCITY_LIMITS_DATA::ID => {
36628                Some(Self::VELOCITY_LIMITS(VELOCITY_LIMITS_DATA::default()))
36629            }
36630            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
36631            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
36632            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36633                VICON_POSITION_ESTIMATE_DATA::default(),
36634            )),
36635            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36636                VIDEO_STREAM_INFORMATION_DATA::default(),
36637            )),
36638            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36639                VIDEO_STREAM_STATUS_DATA::default(),
36640            )),
36641            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36642                VISION_POSITION_ESTIMATE_DATA::default(),
36643            )),
36644            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36645                VISION_SPEED_ESTIMATE_DATA::default(),
36646            )),
36647            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
36648            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
36649            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
36650            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
36651            _ => None,
36652        }
36653    }
36654    #[cfg(feature = "arbitrary")]
36655    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
36656        match id {
36657            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36658                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36659            )),
36660            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36661                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
36662            )),
36663            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
36664            AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::random(rng))),
36665            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
36666            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
36667            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
36668            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36669                ATTITUDE_QUATERNION_DATA::random(rng),
36670            )),
36671            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36672                ATTITUDE_QUATERNION_COV_DATA::random(rng),
36673            )),
36674            ATTITUDE_TARGET_DATA::ID => {
36675                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
36676            }
36677            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
36678            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
36679            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36680                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36681                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
36682                ))
36683            }
36684            AUTOPILOT_VERSION_DATA::ID => {
36685                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
36686            }
36687            AVAILABLE_MODES_DATA::ID => {
36688                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
36689            }
36690            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36691                AVAILABLE_MODES_MONITOR_DATA::random(rng),
36692            )),
36693            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
36694            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
36695            BATTERY_STATUS_V2_DATA::ID => {
36696                Some(Self::BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA::random(rng)))
36697            }
36698            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
36699            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36700                CAMERA_CAPTURE_STATUS_DATA::random(rng),
36701            )),
36702            CAMERA_FOV_STATUS_DATA::ID => {
36703                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
36704            }
36705            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36706                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
36707            )),
36708            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
36709                CAMERA_INFORMATION_DATA::random(rng),
36710            )),
36711            CAMERA_SETTINGS_DATA::ID => {
36712                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36713            }
36714            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36715                CAMERA_THERMAL_RANGE_DATA::random(rng),
36716            )),
36717            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36718                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36719            )),
36720            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36721                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36722            )),
36723            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36724            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36725            CAN_FILTER_MODIFY_DATA::ID => {
36726                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36727            }
36728            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36729            CELLULAR_CONFIG_DATA::ID => {
36730                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36731            }
36732            CELLULAR_STATUS_DATA::ID => {
36733                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36734            }
36735            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36736                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36737            )),
36738            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36739                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36740            )),
36741            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36742            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36743            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36744            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36745            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36746            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36747                COMPONENT_INFORMATION_DATA::random(rng),
36748            )),
36749            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36750                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36751            )),
36752            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36753                COMPONENT_METADATA_DATA::random(rng),
36754            )),
36755            CONTROL_STATUS_DATA::ID => Some(Self::CONTROL_STATUS(CONTROL_STATUS_DATA::random(rng))),
36756            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36757                CONTROL_SYSTEM_STATE_DATA::random(rng),
36758            )),
36759            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36760                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36761            )),
36762            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36763            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36764            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36765                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36766            )),
36767            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36768            DEBUG_FLOAT_ARRAY_DATA::ID => {
36769                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36770            }
36771            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36772            DISTANCE_SENSOR_DATA::ID => {
36773                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36774            }
36775            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36776            ENCAPSULATED_DATA_DATA::ID => {
36777                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36778            }
36779            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36780            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36781            ESTIMATOR_STATUS_DATA::ID => {
36782                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36783            }
36784            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36785            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36786                EXTENDED_SYS_STATE_DATA::random(rng),
36787            )),
36788            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36789            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
36790                FIGURE_EIGHT_EXECUTION_STATUS_DATA::random(rng),
36791            )),
36792            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36793                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36794            )),
36795            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36796                FLIGHT_INFORMATION_DATA::random(rng),
36797            )),
36798            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36799            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36800            GENERATOR_STATUS_DATA::ID => {
36801                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36802            }
36803            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36804                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36805            )),
36806            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36807                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36808            )),
36809            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36810                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36811            )),
36812            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36813                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36814            )),
36815            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36816                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36817            )),
36818            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36819                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36820                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36821                ))
36822            }
36823            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36824                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36825            )),
36826            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36827                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36828            )),
36829            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36830                GLOBAL_POSITION_INT_DATA::random(rng),
36831            )),
36832            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36833                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36834            )),
36835            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36836                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36837                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36838                ))
36839            }
36840            GNSS_INTEGRITY_DATA::ID => Some(Self::GNSS_INTEGRITY(GNSS_INTEGRITY_DATA::random(rng))),
36841            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36842            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36843            GPS_GLOBAL_ORIGIN_DATA::ID => {
36844                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36845            }
36846            GPS_INJECT_DATA_DATA::ID => {
36847                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36848            }
36849            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36850            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36851            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36852            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36853            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36854            GROUP_END_DATA::ID => Some(Self::GROUP_END(GROUP_END_DATA::random(rng))),
36855            GROUP_START_DATA::ID => Some(Self::GROUP_START(GROUP_START_DATA::random(rng))),
36856            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36857            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36858            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36859            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36860            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36861                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36862            )),
36863            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36864            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36865            HIL_OPTICAL_FLOW_DATA::ID => {
36866                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36867            }
36868            HIL_RC_INPUTS_RAW_DATA::ID => {
36869                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36870            }
36871            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36872            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36873            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36874                HIL_STATE_QUATERNION_DATA::random(rng),
36875            )),
36876            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36877            HYGROMETER_SENSOR_DATA::ID => {
36878                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36879            }
36880            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36881                ILLUMINATOR_STATUS_DATA::random(rng),
36882            )),
36883            ISBD_LINK_STATUS_DATA::ID => {
36884                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36885            }
36886            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36887            LINK_NODE_STATUS_DATA::ID => {
36888                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36889            }
36890            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36891                LOCAL_POSITION_NED_DATA::random(rng),
36892            )),
36893            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36894                LOCAL_POSITION_NED_COV_DATA::random(rng),
36895            )),
36896            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36897                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36898                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36899                ))
36900            }
36901            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36902            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36903            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36904                LOGGING_DATA_ACKED_DATA::random(rng),
36905            )),
36906            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36907            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36908            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36909            LOG_REQUEST_DATA_DATA::ID => {
36910                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36911            }
36912            LOG_REQUEST_END_DATA::ID => {
36913                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36914            }
36915            LOG_REQUEST_LIST_DATA::ID => {
36916                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36917            }
36918            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36919            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36920            MANUAL_SETPOINT_DATA::ID => {
36921                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36922            }
36923            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36924            MESSAGE_INTERVAL_DATA::ID => {
36925                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36926            }
36927            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36928            MISSION_CLEAR_ALL_DATA::ID => {
36929                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36930            }
36931            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36932            MISSION_CURRENT_DATA::ID => {
36933                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36934            }
36935            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36936            MISSION_ITEM_INT_DATA::ID => {
36937                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36938            }
36939            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36940                MISSION_ITEM_REACHED_DATA::random(rng),
36941            )),
36942            MISSION_REQUEST_DATA::ID => {
36943                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36944            }
36945            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36946                MISSION_REQUEST_INT_DATA::random(rng),
36947            )),
36948            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36949                MISSION_REQUEST_LIST_DATA::random(rng),
36950            )),
36951            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36952                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36953            )),
36954            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36955                MISSION_SET_CURRENT_DATA::random(rng),
36956            )),
36957            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36958                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36959            )),
36960            MOUNT_ORIENTATION_DATA::ID => {
36961                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36962            }
36963            NAMED_VALUE_FLOAT_DATA::ID => {
36964                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36965            }
36966            NAMED_VALUE_INT_DATA::ID => {
36967                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36968            }
36969            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36970                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36971            )),
36972            OBSTACLE_DISTANCE_DATA::ID => {
36973                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36974            }
36975            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36976            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36977                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36978            )),
36979            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36980                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36981            )),
36982            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36983                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36984            )),
36985            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36986                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36987            )),
36988            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36989                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36990            )),
36991            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36992                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36993            )),
36994            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36995                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36996            )),
36997            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36998                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36999            )),
37000            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37001                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
37002            )),
37003            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37004                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
37005            )),
37006            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
37007            OPTICAL_FLOW_RAD_DATA::ID => {
37008                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
37009            }
37010            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37011                ORBIT_EXECUTION_STATUS_DATA::random(rng),
37012            )),
37013            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
37014            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37015                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
37016            )),
37017            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37018                PARAM_EXT_REQUEST_READ_DATA::random(rng),
37019            )),
37020            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
37021            PARAM_EXT_VALUE_DATA::ID => {
37022                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
37023            }
37024            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
37025            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
37026                PARAM_REQUEST_LIST_DATA::random(rng),
37027            )),
37028            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
37029                PARAM_REQUEST_READ_DATA::random(rng),
37030            )),
37031            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
37032            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
37033            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
37034            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
37035            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
37036            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37037                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37038            )),
37039            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37040                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37041            )),
37042            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
37043            PROTOCOL_VERSION_DATA::ID => {
37044                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
37045            }
37046            RADIO_RC_CHANNELS_DATA::ID => {
37047                Some(Self::RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA::random(rng)))
37048            }
37049            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
37050            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
37051            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
37052            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
37053            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
37054            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37055                RC_CHANNELS_OVERRIDE_DATA::random(rng),
37056            )),
37057            RC_CHANNELS_RAW_DATA::ID => {
37058                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
37059            }
37060            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
37061                RC_CHANNELS_SCALED_DATA::random(rng),
37062            )),
37063            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37064                REQUEST_DATA_STREAM_DATA::random(rng),
37065            )),
37066            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
37067            RESOURCE_REQUEST_DATA::ID => {
37068                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
37069            }
37070            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37071                RESPONSE_EVENT_ERROR_DATA::random(rng),
37072            )),
37073            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37074                SAFETY_ALLOWED_AREA_DATA::random(rng),
37075            )),
37076            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37077                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
37078            )),
37079            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
37080            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
37081            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
37082            SCALED_PRESSURE_DATA::ID => {
37083                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
37084            }
37085            SCALED_PRESSURE2_DATA::ID => {
37086                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
37087            }
37088            SCALED_PRESSURE3_DATA::ID => {
37089                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
37090            }
37091            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
37092            SERVO_OUTPUT_RAW_DATA::ID => {
37093                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
37094            }
37095            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
37096            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37097                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37098            )),
37099            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37100                SET_ATTITUDE_TARGET_DATA::random(rng),
37101            )),
37102            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37103                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
37104            )),
37105            SET_HOME_POSITION_DATA::ID => {
37106                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
37107            }
37108            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
37109            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37110                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37111            )),
37112            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37113                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37114            )),
37115            SET_VELOCITY_LIMITS_DATA::ID => Some(Self::SET_VELOCITY_LIMITS(
37116                SET_VELOCITY_LIMITS_DATA::random(rng),
37117            )),
37118            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
37119            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
37120                SMART_BATTERY_INFO_DATA::random(rng),
37121            )),
37122            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
37123            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37124                STORAGE_INFORMATION_DATA::random(rng),
37125            )),
37126            SUPPORTED_TUNES_DATA::ID => {
37127                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
37128            }
37129            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
37130            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
37131            TARGET_ABSOLUTE_DATA::ID => {
37132                Some(Self::TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA::random(rng)))
37133            }
37134            TARGET_RELATIVE_DATA::ID => {
37135                Some(Self::TARGET_RELATIVE(TARGET_RELATIVE_DATA::random(rng)))
37136            }
37137            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
37138            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
37139            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
37140            TERRAIN_REQUEST_DATA::ID => {
37141                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
37142            }
37143            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
37144            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37145                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
37146            )),
37147            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37148                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37149                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
37150                ))
37151            }
37152            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37153                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37154                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
37155                ))
37156            }
37157            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
37158            UAVCAN_NODE_INFO_DATA::ID => {
37159                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
37160            }
37161            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
37162                UAVCAN_NODE_STATUS_DATA::random(rng),
37163            )),
37164            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37165                UTM_GLOBAL_POSITION_DATA::random(rng),
37166            )),
37167            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
37168            VELOCITY_LIMITS_DATA::ID => {
37169                Some(Self::VELOCITY_LIMITS(VELOCITY_LIMITS_DATA::random(rng)))
37170            }
37171            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
37172            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
37173            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37174                VICON_POSITION_ESTIMATE_DATA::random(rng),
37175            )),
37176            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37177                VIDEO_STREAM_INFORMATION_DATA::random(rng),
37178            )),
37179            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37180                VIDEO_STREAM_STATUS_DATA::random(rng),
37181            )),
37182            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37183                VISION_POSITION_ESTIMATE_DATA::random(rng),
37184            )),
37185            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37186                VISION_SPEED_ESTIMATE_DATA::random(rng),
37187            )),
37188            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
37189            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
37190            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
37191            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
37192            _ => None,
37193        }
37194    }
37195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37196        match self {
37197            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37198            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
37199            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
37200            Self::AIRSPEED(body) => body.ser(version, bytes),
37201            Self::AIS_VESSEL(body) => body.ser(version, bytes),
37202            Self::ALTITUDE(body) => body.ser(version, bytes),
37203            Self::ATTITUDE(body) => body.ser(version, bytes),
37204            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
37205            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
37206            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
37207            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
37208            Self::AUTH_KEY(body) => body.ser(version, bytes),
37209            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
37210            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
37211            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
37212            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
37213            Self::BATTERY_INFO(body) => body.ser(version, bytes),
37214            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
37215            Self::BATTERY_STATUS_V2(body) => body.ser(version, bytes),
37216            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
37217            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
37218            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
37219            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
37220            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
37221            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
37222            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
37223            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
37224            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
37225            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
37226            Self::CANFD_FRAME(body) => body.ser(version, bytes),
37227            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
37228            Self::CAN_FRAME(body) => body.ser(version, bytes),
37229            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
37230            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
37231            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
37232            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
37233            Self::COLLISION(body) => body.ser(version, bytes),
37234            Self::COMMAND_ACK(body) => body.ser(version, bytes),
37235            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
37236            Self::COMMAND_INT(body) => body.ser(version, bytes),
37237            Self::COMMAND_LONG(body) => body.ser(version, bytes),
37238            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
37239            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
37240            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
37241            Self::CONTROL_STATUS(body) => body.ser(version, bytes),
37242            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
37243            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
37244            Self::CURRENT_MODE(body) => body.ser(version, bytes),
37245            Self::DATA_STREAM(body) => body.ser(version, bytes),
37246            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
37247            Self::DEBUG(body) => body.ser(version, bytes),
37248            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
37249            Self::DEBUG_VECT(body) => body.ser(version, bytes),
37250            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
37251            Self::EFI_STATUS(body) => body.ser(version, bytes),
37252            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
37253            Self::ESC_INFO(body) => body.ser(version, bytes),
37254            Self::ESC_STATUS(body) => body.ser(version, bytes),
37255            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
37256            Self::EVENT(body) => body.ser(version, bytes),
37257            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
37258            Self::FENCE_STATUS(body) => body.ser(version, bytes),
37259            Self::FIGURE_EIGHT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37260            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
37261            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
37262            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
37263            Self::FUEL_STATUS(body) => body.ser(version, bytes),
37264            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
37265            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
37266            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
37267            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
37268            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
37269            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
37270            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
37271            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
37272            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
37273            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
37274            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
37275            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37276            Self::GNSS_INTEGRITY(body) => body.ser(version, bytes),
37277            Self::GPS2_RAW(body) => body.ser(version, bytes),
37278            Self::GPS2_RTK(body) => body.ser(version, bytes),
37279            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37280            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37281            Self::GPS_INPUT(body) => body.ser(version, bytes),
37282            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37283            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37284            Self::GPS_RTK(body) => body.ser(version, bytes),
37285            Self::GPS_STATUS(body) => body.ser(version, bytes),
37286            Self::GROUP_END(body) => body.ser(version, bytes),
37287            Self::GROUP_START(body) => body.ser(version, bytes),
37288            Self::HEARTBEAT(body) => body.ser(version, bytes),
37289            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37290            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37291            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37292            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37293            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37294            Self::HIL_GPS(body) => body.ser(version, bytes),
37295            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37296            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37297            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37298            Self::HIL_STATE(body) => body.ser(version, bytes),
37299            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37300            Self::HOME_POSITION(body) => body.ser(version, bytes),
37301            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37302            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37303            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37304            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37305            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37306            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37307            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37308            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37309            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37310            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37311            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37312            Self::LOG_DATA(body) => body.ser(version, bytes),
37313            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37314            Self::LOG_ERASE(body) => body.ser(version, bytes),
37315            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37316            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37317            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37318            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37319            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37320            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37321            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37322            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37323            Self::MISSION_ACK(body) => body.ser(version, bytes),
37324            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37325            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37326            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37327            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37328            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37329            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37330            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37331            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37332            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37333            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37334            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37335            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37336            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37337            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37338            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37339            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37340            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37341            Self::ODOMETRY(body) => body.ser(version, bytes),
37342            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37343            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37344            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37345            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37346            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37347            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37348            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37349            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37350            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37351            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37352            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37353            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37354            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37355            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37356            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37357            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37358            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37359            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37360            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37361            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37362            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37363            Self::PARAM_SET(body) => body.ser(version, bytes),
37364            Self::PARAM_VALUE(body) => body.ser(version, bytes),
37365            Self::PING(body) => body.ser(version, bytes),
37366            Self::PLAY_TUNE(body) => body.ser(version, bytes),
37367            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
37368            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37369            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37370            Self::POWER_STATUS(body) => body.ser(version, bytes),
37371            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
37372            Self::RADIO_RC_CHANNELS(body) => body.ser(version, bytes),
37373            Self::RADIO_STATUS(body) => body.ser(version, bytes),
37374            Self::RAW_IMU(body) => body.ser(version, bytes),
37375            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
37376            Self::RAW_RPM(body) => body.ser(version, bytes),
37377            Self::RC_CHANNELS(body) => body.ser(version, bytes),
37378            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
37379            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
37380            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
37381            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
37382            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
37383            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
37384            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
37385            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
37386            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
37387            Self::SCALED_IMU(body) => body.ser(version, bytes),
37388            Self::SCALED_IMU2(body) => body.ser(version, bytes),
37389            Self::SCALED_IMU3(body) => body.ser(version, bytes),
37390            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
37391            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
37392            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
37393            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
37394            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
37395            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
37396            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37397            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
37398            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37399            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
37400            Self::SET_MODE(body) => body.ser(version, bytes),
37401            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37402            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37403            Self::SET_VELOCITY_LIMITS(body) => body.ser(version, bytes),
37404            Self::SIM_STATE(body) => body.ser(version, bytes),
37405            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
37406            Self::STATUSTEXT(body) => body.ser(version, bytes),
37407            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
37408            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
37409            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
37410            Self::SYS_STATUS(body) => body.ser(version, bytes),
37411            Self::TARGET_ABSOLUTE(body) => body.ser(version, bytes),
37412            Self::TARGET_RELATIVE(body) => body.ser(version, bytes),
37413            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
37414            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
37415            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
37416            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
37417            Self::TIMESYNC(body) => body.ser(version, bytes),
37418            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
37419            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
37420            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
37421            Self::TUNNEL(body) => body.ser(version, bytes),
37422            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
37423            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
37424            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
37425            Self::V2_EXTENSION(body) => body.ser(version, bytes),
37426            Self::VELOCITY_LIMITS(body) => body.ser(version, bytes),
37427            Self::VFR_HUD(body) => body.ser(version, bytes),
37428            Self::VIBRATION(body) => body.ser(version, bytes),
37429            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37430            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
37431            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
37432            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37433            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
37434            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
37435            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
37436            Self::WINCH_STATUS(body) => body.ser(version, bytes),
37437            Self::WIND_COV(body) => body.ser(version, bytes),
37438        }
37439    }
37440    fn extra_crc(id: u32) -> u8 {
37441        match id {
37442            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37443            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
37444            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
37445            AIRSPEED_DATA::ID => AIRSPEED_DATA::EXTRA_CRC,
37446            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
37447            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
37448            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
37449            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
37450            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
37451            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
37452            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
37453            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
37454            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37455                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
37456            }
37457            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
37458            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
37459            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
37460            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
37461            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
37462            BATTERY_STATUS_V2_DATA::ID => BATTERY_STATUS_V2_DATA::EXTRA_CRC,
37463            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
37464            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
37465            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
37466            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
37467            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
37468            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
37469            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
37470            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
37471            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
37472            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
37473            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
37474            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
37475            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
37476            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
37477            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
37478            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
37479            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
37480            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
37481            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
37482            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
37483            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
37484            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
37485            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
37486            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
37487            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
37488            CONTROL_STATUS_DATA::ID => CONTROL_STATUS_DATA::EXTRA_CRC,
37489            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
37490            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
37491            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
37492            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
37493            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
37494            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
37495            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
37496            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
37497            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
37498            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
37499            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
37500            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
37501            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
37502            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
37503            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
37504            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
37505            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
37506            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => FIGURE_EIGHT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37507            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
37508            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
37509            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
37510            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
37511            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
37512            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
37513            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
37514            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
37515            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
37516            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
37517            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37518                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
37519            }
37520            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
37521            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
37522            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
37523            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
37524            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37525                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
37526            }
37527            GNSS_INTEGRITY_DATA::ID => GNSS_INTEGRITY_DATA::EXTRA_CRC,
37528            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
37529            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
37530            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37531            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
37532            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
37533            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
37534            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
37535            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
37536            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
37537            GROUP_END_DATA::ID => GROUP_END_DATA::EXTRA_CRC,
37538            GROUP_START_DATA::ID => GROUP_START_DATA::EXTRA_CRC,
37539            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
37540            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
37541            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
37542            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
37543            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
37544            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
37545            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
37546            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
37547            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
37548            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
37549            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
37550            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
37551            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
37552            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
37553            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
37554            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
37555            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
37556            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
37557            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
37558            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
37559            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37560                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
37561            }
37562            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
37563            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
37564            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
37565            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
37566            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
37567            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
37568            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
37569            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
37570            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
37571            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
37572            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
37573            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
37574            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
37575            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
37576            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
37577            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
37578            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
37579            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
37580            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
37581            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
37582            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
37583            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
37584            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
37585            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
37586            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
37587            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
37588            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
37589            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
37590            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
37591            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
37592            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
37593            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
37594            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
37595            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
37596            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
37597            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
37598            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
37599            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
37600            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
37601            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
37602            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
37603            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
37604            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
37605            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
37606            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
37607            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37608            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
37609            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
37610            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
37611            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
37612            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
37613            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
37614            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
37615            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
37616            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
37617            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
37618            PING_DATA::ID => PING_DATA::EXTRA_CRC,
37619            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
37620            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
37621            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
37622            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37623            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
37624            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
37625            RADIO_RC_CHANNELS_DATA::ID => RADIO_RC_CHANNELS_DATA::EXTRA_CRC,
37626            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
37627            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
37628            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
37629            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
37630            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
37631            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
37632            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
37633            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
37634            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
37635            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
37636            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
37637            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
37638            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
37639            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
37640            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
37641            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
37642            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
37643            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
37644            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
37645            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
37646            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
37647            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
37648            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
37649            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37650            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
37651            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37652            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
37653            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
37654            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37655                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
37656            }
37657            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37658            SET_VELOCITY_LIMITS_DATA::ID => SET_VELOCITY_LIMITS_DATA::EXTRA_CRC,
37659            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
37660            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
37661            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
37662            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
37663            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
37664            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
37665            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
37666            TARGET_ABSOLUTE_DATA::ID => TARGET_ABSOLUTE_DATA::EXTRA_CRC,
37667            TARGET_RELATIVE_DATA::ID => TARGET_RELATIVE_DATA::EXTRA_CRC,
37668            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
37669            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
37670            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
37671            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
37672            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
37673            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
37674            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37675                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
37676            }
37677            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37678                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
37679            }
37680            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
37681            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
37682            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
37683            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
37684            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
37685            VELOCITY_LIMITS_DATA::ID => VELOCITY_LIMITS_DATA::EXTRA_CRC,
37686            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
37687            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
37688            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37689            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
37690            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
37691            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37692            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
37693            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
37694            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
37695            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
37696            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
37697            _ => 0,
37698        }
37699    }
37700    fn target_system_id(&self) -> Option<u8> {
37701        match self {
37702            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
37703            Self::CANFD_FRAME(inner) => Some(inner.target_system),
37704            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
37705            Self::CAN_FRAME(inner) => Some(inner.target_system),
37706            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
37707            Self::COMMAND_ACK(inner) => Some(inner.target_system),
37708            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
37709            Self::COMMAND_INT(inner) => Some(inner.target_system),
37710            Self::COMMAND_LONG(inner) => Some(inner.target_system),
37711            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
37712            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
37713            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
37714            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
37715            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
37716            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
37717            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
37718            Self::LOGGING_ACK(inner) => Some(inner.target_system),
37719            Self::LOGGING_DATA(inner) => Some(inner.target_system),
37720            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
37721            Self::LOG_ERASE(inner) => Some(inner.target_system),
37722            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
37723            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
37724            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
37725            Self::MISSION_ACK(inner) => Some(inner.target_system),
37726            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
37727            Self::MISSION_COUNT(inner) => Some(inner.target_system),
37728            Self::MISSION_ITEM(inner) => Some(inner.target_system),
37729            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
37730            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
37731            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
37732            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
37733            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
37734            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
37735            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
37736            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
37737            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
37738            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
37739            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
37740            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37741            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37742            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37743            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37744            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37745            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37746            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37747            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37748            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37749            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37750            Self::PARAM_SET(inner) => Some(inner.target_system),
37751            Self::PING(inner) => Some(inner.target_system),
37752            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37753            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37754            Self::RADIO_RC_CHANNELS(inner) => Some(inner.target_system),
37755            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37756            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37757            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37758            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37759            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37760            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37761            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37762            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37763            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37764            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37765            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37766            Self::SET_MODE(inner) => Some(inner.target_system),
37767            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37768            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37769            Self::SET_VELOCITY_LIMITS(inner) => Some(inner.target_system),
37770            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37771            Self::TIMESYNC(inner) => Some(inner.target_system),
37772            Self::TUNNEL(inner) => Some(inner.target_system),
37773            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37774            _ => None,
37775        }
37776    }
37777    fn target_component_id(&self) -> Option<u8> {
37778        match self {
37779            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37780            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37781            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37782            Self::CAN_FRAME(inner) => Some(inner.target_component),
37783            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37784            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37785            Self::COMMAND_INT(inner) => Some(inner.target_component),
37786            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37787            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37788            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37789            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37790            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37791            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37792            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37793            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37794            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37795            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37796            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37797            Self::LOG_ERASE(inner) => Some(inner.target_component),
37798            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37799            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37800            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37801            Self::MISSION_ACK(inner) => Some(inner.target_component),
37802            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37803            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37804            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37805            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37806            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37807            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37808            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37809            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37810            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37811            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37812            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37813            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37814            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37815            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37816            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37817            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37818            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37819            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37820            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37821            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37822            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37823            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37824            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37825            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37826            Self::PARAM_SET(inner) => Some(inner.target_component),
37827            Self::PING(inner) => Some(inner.target_component),
37828            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37829            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37830            Self::RADIO_RC_CHANNELS(inner) => Some(inner.target_component),
37831            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37832            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37833            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37834            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37835            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37836            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37837            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37838            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37839            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37840            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37841            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37842            Self::SET_VELOCITY_LIMITS(inner) => Some(inner.target_component),
37843            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37844            Self::TIMESYNC(inner) => Some(inner.target_component),
37845            Self::TUNNEL(inner) => Some(inner.target_component),
37846            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37847            _ => None,
37848        }
37849    }
37850}